Last active
July 7, 2020 17:39
-
-
Save 0m3r/06a2fe4df78a149dd40fa3ba28ff945c to your computer and use it in GitHub Desktop.
find class method location
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
$classInstance = $this; | |
$methodName = 'getSome'; | |
$r = new \ReflectionMethod($classInstance, $methodName); | |
var_dump($r->getFileName() . ':' . $r->getStartLine() . ' - ' . $r->getEndLine()); |
Author
0m3r
commented
Jul 7, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment