mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
* reflection: Add `ReflectionGenerator::isClosed()` see https://github.com/php/php-src/pull/14167#issuecomment-2133641998 * Fix test expectation * Drop `{{{` / `}}}` comments around `ReflectionGenerator::isClosed()`
23 lines
302 B
PHP
23 lines
302 B
PHP
--TEST--
|
|
ReflectionGenerator::getTrace()
|
|
--FILE--
|
|
<?php
|
|
function foo()
|
|
{
|
|
yield 1;
|
|
}
|
|
|
|
$g = foo();
|
|
$r = new ReflectionGenerator($g);
|
|
|
|
$g->next();
|
|
|
|
try {
|
|
$r->getTrace();
|
|
} catch (ReflectionException $e) {
|
|
echo $e->getMessage();
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Cannot fetch information from a closed Generator
|