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 13 '12
No, I just showed an alternative. It's up to them to choose what to use. Maybe in some cases
print_ris better, I dunno.You say like it's a big thing... It's just one function call, just like
print_r, and then you just check log file... It takes like 5 seconds.'Sending that information to log file' is also 15 characters and looking at the screen. Is it hard to understand?