php-src/ext/reflection/tests/027.phpt
2020-02-03 22:52:20 +01:00

23 lines
306 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 terminated Generator