Thursday, 13 March 2014

How to find out in which file and line a given function was defined?



$reflFunc =new ReflectionFunction('function_name');
print $reflFunc->getFileName().':'. $reflFunc->getStartLine();

Example output:

W:\domains\my_legium\public_html\application\helpers\utils_helper.php:232


No comments:

Post a Comment