xref: /PHP-7.4/Zend/tests/generators/bug79600.phpt (revision d87b0685)
1--TEST--
2Bug #79600: Regression in 7.4.6 when yielding an array based generator
3--FILE--
4<?php
5
6function createArrayGenerator() {
7    yield from [
8        1,
9        2,
10    ];
11}
12
13function createGeneratorFromArrayGenerator() {
14    yield from createArrayGenerator();
15}
16
17foreach (createGeneratorFromArrayGenerator() as $value) {
18    echo $value, "\n";
19}
20
21?>
22--EXPECT--
231
242
25