diff options
Diffstat (limited to 'Zend/tests/try_catch_finally_002.phpt')
-rw-r--r-- | Zend/tests/try_catch_finally_002.phpt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Zend/tests/try_catch_finally_002.phpt b/Zend/tests/try_catch_finally_002.phpt new file mode 100644 index 0000000000..79efcb3de8 --- /dev/null +++ b/Zend/tests/try_catch_finally_002.phpt @@ -0,0 +1,42 @@ +--TEST-- +Try catch finally catch(multi catch blocks) +--FILE-- +<?php + +class AE extends Exception {}; +class BE extends Exception {}; + +function foo () { + try { + try { + try { + try { + echo "1"; + throw new Exception("try"); + } catch (AE $e) { + die("error"); + } finally { + echo "2"; + } + } finally { + echo "3"; + } + } catch (BE $e) { + die("error"); + } finally { + echo "4"; + } + } catch (Exception $e) { + echo "5"; + } catch (AE $e) { + die("error"); + } finally { + echo "6"; + } + return 7; +} + +var_dump(foo()); +?> +--EXPECTF-- +123456int(7) |