0

I am interested to know if PHP has a super class like Java's Object.

The reason I would like to know is that I want to overload it for the purpose of gaining insight to my large PHP project. I aim to overload the class to determine what is being called and develop some knowledge about classes which may be deprecated/aren't used.

Potentially, this may be a question of a tool that you may point me to (as I am sure there would be something like this already). I have searched and couldn't find anything (potentially bad google foo skills) and in the case the tool is found I am happy to alter the question so not as to mislead others who find this.

Many thanks everyone.

  • It doesn't. But even if it did, how would you "overload" it? There are tools that can tell you exactly what is being called -- debuggers and profilers. – Jon Jan 27 '14 at 11:47

1 Answers1

0

There is no superclass in php. And there is no overloading since PHP is not type save. However there are tools detecting dead code in your project, e.g. phpdcd developed primarily by Sebastian Bergmann. Although it has some limitations it should find most of your dead code.

You might want to read this thread on stackoverflow for some more solutions.

Community
  • 1
  • 1
Anticom
  • 975
  • 13
  • 29