phpCallGraph is a tool to generate static call graphs for PHP source code. Such a graph visualizes the call dependencies among methods or functions of an application. Arrows represent calls from one method to another method. Classes are drawn as rectangles containing the respective methods. The graphs can be leveraged to gain a better understanding of large PHP applications or even to debunk design flaws in them. The example call graph on the right shows the main class of phpCallGraph itself and the internal dependencies among its methods. It is also possible to visualize calls to internal functions of PHP and to some extend call dependencies among different classes. Have a look at the example call graphs to get an impression.
The core of the call graph generator forms an object-oriented PHP5 library, which may also be integrated in other projects. It leverages the InstantSVC CodeAnalyzer and DOT. On top of it, a commandline application allows easy creation of call graphs in various formats, e.g. text, png, jpg or svg. phpCallGraph is free software licensed under GPLv3.