ReflectionObject_isInstantiable_error.phpt 628 B

12345678910111213141516171819202122
  1. --TEST--
  2. ReflectionObject::IsInstantiable() - invalid params
  3. --FILE--
  4. <?php
  5. class privateCtorOld {
  6. private function privateCtorOld() {}
  7. public static function reflectionObjectFactory() {
  8. return new ReflectionObject(new self);
  9. }
  10. }
  11. $reflectionObject = privateCtorOld::reflectionObjectFactory();
  12. var_dump($reflectionObject->IsInstantiable('X'));
  13. var_dump($reflectionObject->IsInstantiable(0, null));
  14. ?>
  15. --EXPECTF--
  16. Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 1 given in %s on line %d
  17. NULL
  18. Warning: ReflectionClass::isInstantiable() expects exactly 0 parameters, 2 given in %s on line %d
  19. NULL