Call graph of the main class of phpCallGraph itself
Call graph of the main class of phpCallGraph itself.

phpCallGraph - A Call Graph Generator for PHP

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.

I'm developing phpCallGraph just for fun in my spare time and I'm always eger on getting feedback or feature requests. Especially, let me know if you are analyzing any free software, since I collect example call graphs. If you would like to work with the code or test some own visualization ideas, feel free to join the project. I'm happy to give anyone, who is interested, access to the SVN Repository. Just drop me a mail to fakko at users dot sf dot net.

Greetings from Berlin,

Other PHP Visualization Projects

phUML - A UML generator for PHP (see A Call Graph of phUML)
A class graph generator (see also this update)
phpDocumentor - The documentation generator for PHP which also features partial call graphs

GPLv3 logo Logo