1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00
Files
archived-php-src/Zend/tests/generators/bug74157.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

24 lines
260 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);
}
?>
--EXPECT--
int(1)
int(2)
int(3)
int(4)
int(5)