xref: /php-src/Zend/tests/try/try_finally_014.phpt (revision a555cc0b)
1--TEST--
2Break 2 in try and return in finally inside nested loop
3--FILE--
4<?php
5
6function foo() {
7    $array = [1, 2, $n = 3];
8    foreach ($array as $value) {
9        foreach ($array as $value) {
10            try {
11                echo "try\n";
12                break 2;
13            } finally {
14                echo "finally\n";
15                return;
16            }
17        }
18    }
19}
20
21foo();
22?>
23--EXPECT--
24try
25finally
26