Created
July 7, 2016 15:15
-
-
Save sambfreund/a4a281dbe6abe2a32347b8c135796d83 to your computer and use it in GitHub Desktop.
This finds a function's origin. Useful in files with multiple include files. I don't take credit for this, but just don't remember where I found it.
This file contains hidden or 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
$reflFunc = new ReflectionFunction('FUNCTION NAME'); | |
print $reflFunc->getFileName() . ':' . $reflFunc->getStartLine(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment