summaryrefslogtreecommitdiff
path: root/Zend/tests/try/try_finally_018.phpt
blob: 383b44844efb0783e69cba69e8362970c85f5e9c (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
--TEST--
Combination of foreach, finally and goto
--FILE--
<?php
foreach ([new stdClass] as $a) {
    try {
        foreach ([new stdClass] as $a) {
            try {
                foreach ([new stdClass] as $a) {
                    goto out;
                }
            } finally {
                echo "finally1\n";
            }
out: ;
        }
    } finally {
        echo "finally2\n";
    }
}
?>
--EXPECT--
finally1
finally2