1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/generators/bug74606.phpt
2020-02-03 22:52:20 +01:00

30 lines
485 B
PHP

--TEST--
Bug #74606 (Segfault within try/catch/finally nesting in Generators)
--FILE--
<?php
function gen() {
$array = ["foo"];
$array[] = "bar";
foreach ($array as $item) {
try {
try {
yield;
} finally {
echo "fin $item\n";
}
} catch (\Exception $e) {
echo "catch\n";
continue;
}
}
}
gen()->throw(new Exception);
?>
--EXPECT--
fin foo
catch
fin bar