On his "Yet andother PHP blog" today, William Candillon shares a script he's written up to create a visualization of the parse tree of a bit of PHP source code.
I wrote this xslt stylesheet to visualize the parse tree of a PHP source code. The stylesheet can actually convert any XML tree to graph in the dot format interpreted by Graphviz.
His code is a simple seven line script that outputs a nice, clean tree structure image of how the process flows. He includes links to all of the source and files he used to create the tree image.