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.
 
 
 
 
 
 

39 lines
611 B

--TEST--
ReflectionFunction::getFileName()
--CREDITS--
Robin Fernandes <robinf@php.net>
Steve Seear <stevseea@php.net>
--FILE--
<?php
/**
* my doc comment
*/
function foo () {
static $c;
static $a = 1;
static $b = "hello";
$d = 5;
}
/***
* not a doc comment
*/
function bar () {}
function dumpFuncInfo($name) {
$funcInfo = new ReflectionFunction($name);
var_dump($funcInfo->getFileName());
}
dumpFuncInfo('foo');
dumpFuncInfo('bar');
dumpFuncInfo('extract');
?>
--EXPECTF--
string(%d) "%sReflectionFunction_getFileName.002.php"
string(%d) "%sReflectionFunction_getFileName.002.php"
bool(false)