first_class_callable_signature.phpt 396 B

1234567891011121314151617181920
  1. --TEST--
  2. First class callables should retain the signature for reflection
  3. --FILE--
  4. <?php
  5. function test(int $a, string &$b, Foo... $c) {}
  6. echo new ReflectionFunction(test(...));
  7. ?>
  8. --EXPECTF--
  9. Closure [ <user> function test ] {
  10. @@ %s 3 - 3
  11. - Parameters [3] {
  12. Parameter #0 [ <required> int $a ]
  13. Parameter #1 [ <required> string &$b ]
  14. Parameter #2 [ <optional> Foo ...$c ]
  15. }
  16. }