blob: c62c24a2f587477d5f8cfeac6fa2f7ee6920aeaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--TEST--
Yield from does not leave a dangling send target
--FILE--
<?php
function gen1() {
yield from [yield];
}
$gen = gen1();
$gen->send(new stdClass);
function gen2() {
$x = yield;
yield from [1, 2, 3];
}
$gen = gen2();
$gen->send(new stdClass);
$gen->send(new stdClass);
?>
===DONE===
--EXPECT--
===DONE===
|