xref: /PHP-7.4/Zend/tests/bug69221_2.phpt (revision a9d73f06)
1--TEST--
2Bug #69221: Segmentation fault when using a generator in combination with an Iterator (2)
3--FILE--
4<?php
5
6$gen = function() {
7    yield 1;
8};
9
10$iter = new IteratorIterator($gen());
11$ngen = $iter->getInnerIterator();
12
13var_dump(iterator_to_array($ngen, false));
14
15?>
16--EXPECT--
17array(1) {
18  [0]=>
19  int(1)
20}
21