summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72188.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/bug72188.phpt')
-rw-r--r--Zend/tests/bug72188.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/Zend/tests/bug72188.phpt b/Zend/tests/bug72188.phpt
new file mode 100644
index 0000000000..0deab6b81b
--- /dev/null
+++ b/Zend/tests/bug72188.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #72188 (Nested try/finally blocks losing return value)
+--FILE--
+<?php
+function test() {
+ try {
+ return 5;
+ } finally {
+ try {
+ echo 1;
+ } finally {
+ echo 2;
+ }
+ }
+}
+
+
+
+$a = test();
+if($a !== 5) {
+ echo "FAILED: expected 5, received ", var_export($a), PHP_EOL;
+} else {
+ echo "Passed", PHP_EOL;
+}
+?>
+--EXPECT--
+12Passed