ReflectionObject_getName_error.phpt 573 B

1234567891011121314151617181920212223
  1. --TEST--
  2. ReflectionObject::getname() - invalid params
  3. --FILE--
  4. <?php
  5. class C { }
  6. $myInstance = new C;
  7. $r2 = new ReflectionObject($myInstance);
  8. $r3 = new ReflectionObject($r2);
  9. var_dump($r3->getName(null));
  10. var_dump($r3->getName('x','y'));
  11. var_dump($r3->getName(0));
  12. ?>
  13. --EXPECTF--
  14. Warning: ReflectionClass::getName() expects exactly 0 parameters, 1 given in %s on line %d
  15. NULL
  16. Warning: ReflectionClass::getName() expects exactly 0 parameters, 2 given in %s on line %d
  17. NULL
  18. Warning: ReflectionClass::getName() expects exactly 0 parameters, 1 given in %s on line %d
  19. NULL