ReflectionObject_constructor_basic.phpt 505 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. ReflectionObject::__construct - basic function test
  3. --FILE--
  4. <?php
  5. $r1 = new ReflectionObject(new stdClass);
  6. var_dump($r1);
  7. class C { }
  8. $myInstance = new C;
  9. $r2 = new ReflectionObject($myInstance);
  10. var_dump($r2);
  11. $r3 = new ReflectionObject($r2);
  12. var_dump($r3);
  13. ?>
  14. --EXPECTF--
  15. object(ReflectionObject)#%d (1) {
  16. ["name"]=>
  17. string(8) "stdClass"
  18. }
  19. object(ReflectionObject)#%d (1) {
  20. ["name"]=>
  21. string(1) "C"
  22. }
  23. object(ReflectionObject)#%d (1) {
  24. ["name"]=>
  25. string(16) "ReflectionObject"
  26. }