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.

37 lines
955 B

  1. --TEST--
  2. ReflectionObject::getFileName(), ReflectionObject::getStartLine(), ReflectionObject::getEndLine() -invalid aparams
  3. --FILE--
  4. <?php
  5. Class C { }
  6. $rc = new ReflectionObject(new C);
  7. $methods = array("getFileName", "getStartLine", "getEndLine");
  8. foreach ($methods as $method) {
  9. var_dump($rc->$method());
  10. var_dump($rc->$method(null));
  11. var_dump($rc->$method('X', 0));
  12. }
  13. ?>
  14. --EXPECTF--
  15. string(%d) "%s"
  16. Warning: Wrong parameter count for ReflectionClass::getFileName() in %s on line 9
  17. NULL
  18. Warning: Wrong parameter count for ReflectionClass::getFileName() in %s on line 10
  19. NULL
  20. int(2)
  21. Warning: Wrong parameter count for ReflectionClass::getStartLine() in %s on line 9
  22. NULL
  23. Warning: Wrong parameter count for ReflectionClass::getStartLine() in %s on line 10
  24. NULL
  25. int(2)
  26. Warning: Wrong parameter count for ReflectionClass::getEndLine() in %s on line 9
  27. NULL
  28. Warning: Wrong parameter count for ReflectionClass::getEndLine() in %s on line 10
  29. NULL