Created
June 13, 2012 02:06
-
-
Save jcobb/2921358 to your computer and use it in GitHub Desktop.
print_r Beautifier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_print_r($thing,$description=false){ | |
echo '<pre style="background:#fff; padding:10px; color:#111; font-family:monospace; font-size:12px; border:1px solid #555">'; | |
if($description) echo '<strong>'.$description.'</strong><br><br>'; | |
print_r($thing); | |
echo '</pre>'; | |
} | |
//Usage | |
my_print_r($obj, 'Quick description of the object being debugged'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment