I’m trying to analyze an OOP class. For example the class has a constructor that calls other methods and properties. Each method calls other methods or properties and so on. I’m trying to study how all methods and properties relate to one another. I’m doing it by hand now. Is there a tool that could automate some of it? something that automatically analyzes how the functions call into one another and into the properties.
Share
You can generate a “trace” – i.e. tree of all calls that certain run through code produces. There is xhprof, xdebug (free) or Zend Code Tracing ($$) that can do it. Statically it is quite hard to do it due to the dynamic nature of PHP, though there’s phpCallGraph that could be helpful.