xref: /PHP-7.0/Zend/tests/bug34065.phpt (revision 610c7fbe)
1--TEST--
2Bug #34065 (throw in foreach causes memory leaks)
3--FILE--
4<?php
5$data = file(__FILE__);
6try {
7  foreach ($data as $line) {
8    throw new Exception("error");
9  }
10} catch (Exception $e) {
11  echo "ok\n";
12}
13?>
14--EXPECT--
15ok
16