I have a php file which contains only one class. how can I know what class is there by knowing the filename? I know I can do something with regexp matching but is there a st
I spent lots of productive time looking for a way around this. From @netcoder's solution its obvious there are lots of cons in all the solutions so far.
So I decided to do this instead. Since most PHP classes has class name same as filename, we could get the class name from the filename. Depending on your project you could also have a naming convention. NB: This assume class does not have namespace