Debugging in PHP

When you want to debug certain sections of code with in an environment without restarting Apache or NGINX, there’s a template I use for displaying print messages.

ini_set('display_errors', 1);

echo "<pre>".json_encode($VALUE, JSON_PRETTY_PRINT)."</pre>";

ini_set('display_errors', 0);