mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
* Make `ReflectionGenerator::getFunction()` legal after generator termination * Expose the generator function name via `Generator::__debugInfo()` * Allow creating `ReflectionGenerator` after termination * Reorder `struct _zend_generator` to avoid a hole * Adjust `ext/reflection/tests/028.phpt` This is legal now. * Fix Generator Closure collection * Add test to verify the Closure dies with the generator * NEWS / UPGRADING
19 lines
219 B
PHP
19 lines
219 B
PHP
--TEST--
|
|
ReflectionGenerator::__construct()
|
|
--FILE--
|
|
<?php
|
|
function foo()
|
|
{
|
|
yield 1;
|
|
}
|
|
|
|
$g = foo();
|
|
$g->next();
|
|
|
|
$r = new ReflectionGenerator($g);
|
|
var_dump($r);
|
|
?>
|
|
--EXPECTF--
|
|
object(ReflectionGenerator)#%d (0) {
|
|
}
|