summaryrefslogtreecommitdiff
path: root/Zend/tests/try_catch_finally_003.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/try_catch_finally_003.phpt')
-rw-r--r--Zend/tests/try_catch_finally_003.phpt38
1 files changed, 38 insertions, 0 deletions
diff --git a/Zend/tests/try_catch_finally_003.phpt b/Zend/tests/try_catch_finally_003.phpt
new file mode 100644
index 0000000000..78b37be124
--- /dev/null
+++ b/Zend/tests/try_catch_finally_003.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Try catch finally
+--FILE--
+<?php
+
+class AE extends Exception {};
+class BE extends Exception {};
+
+function foo () {
+ try {
+ try {
+ try {
+ throw new Exception("try");
+ } catch (AE $e) {
+ die("error");
+ } finally {
+ echo "1";
+ return 1;
+ }
+ } finally {
+ echo "2";
+ return 2;
+ }
+ } catch (BE $e) {
+ die("error");
+ } catch (Exception $e) {
+ echo "3";
+ } finally {
+ echo "4";
+ return 4;
+ }
+ return 5;
+}
+
+var_dump(foo());
+?>
+--EXPECTF--
+1234int(4)