![]() ![]() | ![]() |
1.1 misho 1: --TEST-- 2: Bug #44184 (Double free of loop-variable on exception) 3: --FILE-- 4: <?php 5: function foo() { 6: $x = array(1,2,3); 7: foreach ($x as $a) { 8: while (1) { 9: throw new Exception(); 10: } 11: return; 12: } 13: } 14: try { 15: foo(); 16: } catch (Exception $ex) { 17: echo "ok\n"; 18: } 19: ?> 20: --EXPECT-- 21: ok