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