Anybody who works in CFML knows about cfdump, an indispensable tool for debugging any otherwise hidden values in your ColdFusion logic.
In php, you can use print_r() to dump out an array, but the result is far from reader-friendly. Enter "dBug.php". Get it here: dBug.php project home (If you use it be sure to make at least a small donation to the developer)
Just drop the downloaded dBug.php file into your site, then include it into your global functions or application settings file in any php site (or any php page) and you'll be off and running with dBug:
Once it is available in the page, you can dump out anything with dBug, including any variable, array, object, or even xml just like cfdump
new dBug($xmlData, "xml");
Depending on what you're debugging, you might want to stop any further processing, e.g.
Check out the examples and then give it a shot, it'll save you a ton of time on those days when you simply must write some php.