ReflectionFunction_getFileName.002.phpt 628 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. ReflectionFunction::getFileName()
  3. --CREDITS--
  4. Robin Fernandes <robinf@php.net>
  5. Steve Seear <stevseea@php.net>
  6. --FILE--
  7. <?php
  8. /**
  9. * my doc comment
  10. */
  11. function foo () {
  12. static $c;
  13. static $a = 1;
  14. static $b = "hello";
  15. $d = 5;
  16. }
  17. /***
  18. * not a doc comment
  19. */
  20. function bar () {}
  21. function dumpFuncInfo($name) {
  22. $funcInfo = new ReflectionFunction($name);
  23. var_dump($funcInfo->getFileName());
  24. }
  25. dumpFuncInfo('foo');
  26. dumpFuncInfo('bar');
  27. dumpFuncInfo('extract');
  28. ?>
  29. --EXPECTF--
  30. string(%d) "%sReflectionFunction_getFileName.002.php"
  31. string(%d) "%sReflectionFunction_getFileName.002.php"
  32. bool(false)