ReflectionParameter_export_basic.phpt 484 B

12345678910111213141516171819
  1. --TEST--
  2. ReflectionParameter::export()
  3. --CREDITS--
  4. Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
  5. --FILE--
  6. <?php
  7. function ReflectionParameterTest($test, $test2 = null) {
  8. echo $test;
  9. }
  10. $reflect = new ReflectionFunction('ReflectionParameterTest');
  11. foreach($reflect->getParameters() as $key => $value) {
  12. echo ReflectionParameter::export('ReflectionParameterTest', $key);
  13. }
  14. ?>
  15. ==DONE==
  16. --EXPECT--
  17. Parameter #0 [ <required> $test ]
  18. Parameter #1 [ <optional> $test2 = NULL ]
  19. ==DONE==