bug69802_2.phpt 422 B

1234567891011121314
  1. --TEST--
  2. Bug #69802 (Reflection on Closure::__invoke borks type hint class name)
  3. --FILE--
  4. <?php
  5. $f = (new ReflectionFunction('iterator_to_array'))->getClosure();
  6. $r = new ReflectionMethod($f, '__invoke');
  7. var_dump($r->getParameters()[0]->getClass());
  8. ?>
  9. --EXPECTF--
  10. Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d
  11. object(ReflectionClass)#4 (1) {
  12. ["name"]=>
  13. string(11) "Traversable"
  14. }