dump_r addresses the many shortcomings of PHP's print_r() and var_dump() functions, and many other libraries built for decomposing complex objects into a Web browser. It outputs a minimal but informative representation of anything you feed to it in clean HTML with an embedded, easily tweak-able CSS stylesheet. You can set a configurable maximum depth. There is a bit of JavaScript thrown in to handle interactive collapsing and expanding of nodes, and the class provides hook methods which allow you to create additional custom type detection and styling.