I'm trying to debug a large and complex DOMDocument object in php. Ideally it'd be nice if I could get DOMDocument to output in a array-like format.

DoMDocument:

$dom = new DOMDocument();
$dom->loadHTML("<html><body><p>Hello World</p></body></html>");
var_dump($dom); //or something equivalent

This outputs

DOMDocument Object ( ) 

whereas I'd like it to output

DOMDocument:
html
=>body
==>p
===>Hello World

Or something like that. Why is there no handy debug or output for this?!?

Edit
Report