You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
550 B

  1. --TEST--
  2. ReflectionObject::getName() - basic function test
  3. --FILE--
  4. <?php
  5. $r0 = new ReflectionObject();
  6. var_dump($r0->getName());
  7. $r1 = new ReflectionObject(new stdClass);
  8. var_dump($r1->getName());
  9. class C { }
  10. $myInstance = new C;
  11. $r2 = new ReflectionObject($myInstance);
  12. var_dump($r2->getName());
  13. $r3 = new ReflectionObject($r2);
  14. var_dump($r3->getName());
  15. ?>
  16. --EXPECTF--
  17. Warning: ReflectionObject::__construct() expects exactly 1 parameter, 0 given in %s on line 2
  18. string(0) ""
  19. string(8) "stdClass"
  20. string(1) "C"
  21. string(16) "ReflectionObject"