mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
28 lines
401 B
Plaintext
28 lines
401 B
Plaintext
|
--TEST--
|
||
|
Reflection on closures: Segfault with getClosure() on closure itself
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$closure = function() { echo "Invoked!\n"; };
|
||
|
|
||
|
$method = new ReflectionMethod ($closure);
|
||
|
|
||
|
$closure2 = $method->getClosure ($closure);
|
||
|
|
||
|
$closure2 ();
|
||
|
$closure2->__invoke ();
|
||
|
|
||
|
unset ($closure);
|
||
|
|
||
|
$closure2 ();
|
||
|
$closure2->__invoke ();
|
||
|
|
||
|
?>
|
||
|
===DONE===
|
||
|
--EXPECTF--
|
||
|
Invoked!
|
||
|
Invoked!
|
||
|
Invoked!
|
||
|
Invoked!
|
||
|
===DONE===
|