To trace the origin of a particular function, you can do this:
$reflFunc = new ReflectionFunction('function_name'); print $reflFunc->getFileName() . ':' . $reflFunc->getStartLine();
See How to determine where a function is defined?
To trace the origin of a particular class, you can do this:
$reflClass = new ReflectionClass('class_name'); print $reflClass->getFileName() . ':' . $reflClass->getStartLine();
To get a list of all the inclusions that went into creating the page, you can do this:
var_dump(get_included_files());
To get a list of all the functions defined on the page, you can do this:
var_dump(get_defined_functions());
To get a list of all the user functions on the page, you can do this:
$defined_functions = get_defined_functions(); var_dump($defined_functions["user"]);
source share