xref: /PHP-8.0/Zend/tests/try/try_finally_013.phpt (revision a555cc0b)
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--EXPECT--
22try
23finally
24