Given that each PHP file in our project contains a single class definition, how can I determine what class or classes are defined within the file?
I know I could just regex the file for class statements, but I’d prefer to do something that’s more efficient.
I needed something like this for a project I am working on, and here are the functions I wrote: