summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/027.phpt
blob: 06db60b8ec8aea92bcfbd2dd27aac8c35b015fa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--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();
}
?>
--EXPECTF--
Cannot fetch information from a terminated Generator