mirror of
https://github.com/php/php-src.git
synced 2024-09-29 05:46:06 +00:00
1322672c0b
Also drop some unnecessary TRY_DELREFs -- leftovers from the days when null was refcounted.
23 lines
325 B
PHP
23 lines
325 B
PHP
--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===
|