Last active
September 7, 2017 16:22
-
-
Save ozh/5209b15fe7e9bc08158cf7eacc1406a3 to your computer and use it in GitHub Desktop.
PHP : check where a function is defined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$reflFunc = new ReflectionFunction('function_name'); | |
print $reflFunc->getFileName() . ':' . $reflFunc->getStartLine(); | |
// eg /home/you/includes/file.php:60 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment