bug77772.phpt 402 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #77772: ReflectionClass::getMethods(null) doesn't work
  3. --FILE--
  4. <?php
  5. class Test {
  6. public $prop;
  7. public function method() {}
  8. }
  9. $rc = new ReflectionClass(Test::class);
  10. foreach ($rc->getMethods(null) as $method) {
  11. var_dump($method->getName());
  12. }
  13. foreach ($rc->getProperties(null) as $prop) {
  14. var_dump($prop->getName());
  15. }
  16. ?>
  17. --EXPECT--
  18. string(6) "method"
  19. string(4) "prop"