if (! function_exists('d'))
{
// Debugger
function d($var, $exit = 0)
{
// Only output on localhost
if ($_SERVER['HTTP_HOST'] != 'localhost')
{
return;
}
echo "\n[degug_output_BEGIN]\n";
echo var_export($var, 1);
echo "\n[degug_output_END]\n";
if ($exit)
exit;
}
}
// Call:
d($_POST);
Bonus: Check debug_backtrace() too add tracing to your debugging.