1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
--TEST-- Check that SCCP correctly handles non-terminating frees of loop variables --FILE-- <?php function test() { $arr = []; foreach ($arr as $item) { if (!empty($result)) { return $result; } } return 2; } var_dump(test()); ?> --EXPECT-- int(2)