summaryrefslogtreecommitdiff
path: root/Zend/tests/try_finally_002.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/try_finally_002.phpt')
-rw-r--r--Zend/tests/try_finally_002.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/try_finally_002.phpt b/Zend/tests/try_finally_002.phpt
new file mode 100644
index 0000000000..99a34f62fb
--- /dev/null
+++ b/Zend/tests/try_finally_002.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Try finally (re-throw exception in finally block)
+--FILE--
+<?php
+function foo () {
+ try {
+ throw new Exception("try");
+ } finally {
+ throw new Exception("finally");
+ }
+}
+
+try {
+ foo();
+} catch (Exception $e) {
+ do {
+ var_dump($e->getMessage());
+ } while ($e = $e->getPrevious());
+}
+?>
+--EXPECT--
+string(7) "finally"
+string(3) "try"