mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
a9d73f0646
A generator iterator can be created from different zvals - use the object handle to manage references instead.
21 lines
314 B
PHP
21 lines
314 B
PHP
--TEST--
|
|
Bug #69221: Segmentation fault when using a generator in combination with an Iterator (2)
|
|
--FILE--
|
|
<?php
|
|
|
|
$gen = function() {
|
|
yield 1;
|
|
};
|
|
|
|
$iter = new IteratorIterator($gen());
|
|
$ngen = $iter->getInnerIterator();
|
|
|
|
var_dump(iterator_to_array($ngen, false));
|
|
|
|
?>
|
|
--EXPECT--
|
|
array(1) {
|
|
[0]=>
|
|
int(1)
|
|
}
|