bug74949.phpt 388 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #74949 (null pointer dereference in _function_string)
  3. --FILE--
  4. <?php
  5. $f = function () {};
  6. $r = new ReflectionMethod($f, "__invoke");
  7. unset($f);
  8. echo $r, "\n";
  9. try {
  10. echo $r->getPrototype();
  11. } catch (Exception $e) {
  12. echo $e->getMessage(), "\n";
  13. }
  14. ?>
  15. --EXPECT--
  16. Method [ <internal> public method __invoke ] {
  17. }
  18. Method Closure::__invoke does not have a prototype