Reputation: 397
<?php
//lets say one of these files have the function test();
include 'a.php';
include 'b.php';
include 'c.php';
include 'd.php';
test();
?>
How can I find out which file and line function test() is being called at? (without opening the files) Thanks
Upvotes: 0
Views: 36
Reputation: 2028
You can use reflection with PHP :
$func = new ReflectionFunction('test');
echo $func->getFileName();
echo $func->getStartLine();
Upvotes: 1