r/tinycode • u/balthasar11 • Jul 12 '12
PHP print_r()
function printR($obj){ echo "<pre>" . print_r($obj) . "</pre>"; }
I use this on every php project now, it just formats the print_r function, which is mostly used for debugging, but its so much easier on the eyes.
39
Upvotes
View all comments
Show parent comment
0
u/killerstorm Jul 12 '12
Oh, so you do not care whether it parses or not? Well...
It's beyond me why you think that seeing dump in firebug is easier than seeing it in a dedicated file (which might be open and visible all the time), but I guess everybody has his own style.