How to print every variable and it's value that is being used in a PHP script

I usually append the following code to any PHP script. Just put it at the very bottom of your script before the last ?>.

<?php
echo("<pre style='background-color:white;'>");
ob_start();
print_r($GLOBALS);
$GLOBALS_contents = htmlentities(ob_get_contents());
ob_end_clean();
echo($GLOBALS_contents);
echo("</pre>");
?>

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.