summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug74949.phpt
blob: d69597efb86315632587d741aac736097381df51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #74949 (null pointer dereference in _function_string)
--FILE--
<?php

$f = function () {};

$r = new ReflectionMethod($f, "__invoke");

unset($f);

echo $r, "\n";

try  {
	echo $r->getPrototype();
} catch (Exception $e) {
	echo $e->getMessage(), "\n";	
}
?>
--EXPECT--
Method [ <internal> public method __invoke ] {
}

Method Closure::__invoke does not have a prototype