Skip to content

Instantly share code, notes, and snippets.

@omarjcero
Created August 2, 2021 22:08
Show Gist options
  • Save omarjcero/5052889bbc8490019caaecabce27b73d to your computer and use it in GitHub Desktop.
Save omarjcero/5052889bbc8490019caaecabce27b73d to your computer and use it in GitHub Desktop.
PHP snippet to find class path
<?
class Foo {}
$reflector = new \ReflectionClass('Foo');
echo $reflector->getFileName();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment