1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
Files
archived-php-src/Zend/tests/generators/bug74157.phpt
2017-02-26 12:05:56 +08:00

24 lines
261 B
PHP

--TEST--
Bug #74157 (Segfault with nested generators)
--FILE--
<?php
function a() {
$a = $b = $c = 2;
foreach(range(1, 5) as $v) {
yield $v;
}
return;
}
foreach (a(range(1, 3)) as $a) {
var_dump($a);
}
?>
--EXPECTF--
int(1)
int(2)
int(3)
int(4)
int(5)