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