![]() ![]() | ![]() |
1.1 ! misho 1: --TEST-- ! 2: Bug #34065 (throw in foreach causes memory leaks) ! 3: --FILE-- ! 4: <?php ! 5: $data = file(__FILE__); ! 6: try { ! 7: foreach ($data as $line) { ! 8: throw new Exception("error"); ! 9: } ! 10: } catch (Exception $e) { ! 11: echo "ok\n"; ! 12: } ! 13: ?> ! 14: --EXPECT-- ! 15: ok