mirror of
https://github.com/php/php-src.git
synced 2024-10-20 16:02:44 +00:00
28 lines
401 B
PHP
28 lines
401 B
PHP
--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===
|