ReflectionClass_isArray.phpt 783 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. public bool ReflectionParameter::isArray ( void );
  3. --CREDITS--
  4. marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
  5. --FILE--
  6. <?php
  7. function testReflectionIsArray(array $a, ?array $b, iterable $c, array|string $d) {}
  8. $reflection = new ReflectionFunction('testReflectionIsArray');
  9. foreach ($reflection->getParameters() as $parameter) {
  10. var_dump($parameter->isArray());
  11. }
  12. ?>
  13. --EXPECTF--
  14. Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d
  15. bool(true)
  16. Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d
  17. bool(true)
  18. Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d
  19. bool(false)
  20. Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d
  21. bool(false)