xref: /PHP-7.1/Zend/tests/try/try_finally_018.phpt (revision 74380105)
1--TEST--
2Combination of foreach, finally and goto
3--FILE--
4<?php
5foreach ([new stdClass] as $a) {
6    try {
7        foreach ([new stdClass] as $a) {
8            try {
9                foreach ([new stdClass] as $a) {
10                    goto out;
11                }
12            } finally {
13                echo "finally1\n";
14            }
15out: ;
16        }
17    } finally {
18        echo "finally2\n";
19    }
20}
21?>
22--EXPECT--
23finally1
24finally2
25