summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72188.phpt
blob: 0deab6b81bf07a96aeb84ef5e550f2ca7fbf6656 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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