mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
8094bd1b58
* 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
33 lines
507 B
PHP
33 lines
507 B
PHP
--TEST--
|
|
Test that legacy IS_ITERABLE arg info type generates a notice
|
|
--EXTENSIONS--
|
|
zend_test
|
|
--FILE--
|
|
<?php
|
|
|
|
function gen() {
|
|
yield 1;
|
|
};
|
|
|
|
var_dump(zend_iterable_legacy([], null));
|
|
var_dump(zend_iterable_legacy([], []));
|
|
var_dump(zend_iterable_legacy(gen(), null));
|
|
var_dump(zend_iterable_legacy(gen(), gen()));
|
|
|
|
?>
|
|
==DONE==
|
|
--EXPECTF--
|
|
array(0) {
|
|
}
|
|
array(0) {
|
|
}
|
|
object(Generator)#%d (1) {
|
|
["function"]=>
|
|
string(3) "gen"
|
|
}
|
|
object(Generator)#%d (1) {
|
|
["function"]=>
|
|
string(3) "gen"
|
|
}
|
|
==DONE==
|