Skip to content

Instantly share code, notes, and snippets.

@thomascrepain
Created November 29, 2013 12:41
Show Gist options
  • Save thomascrepain/7705167 to your computer and use it in GitHub Desktop.
Save thomascrepain/7705167 to your computer and use it in GitHub Desktop.
Debug function to be temporally added in global namespace to quickly have a var_dump everywhere in the application
function debug($msg, $exit=true) {
if($_SERVER['REMOTE_ADDR'] == '192.168.0.0') { // only for my ip
echo "<pre>";
var_dump($msg);
echo "</pre>";
if ($exit) {
exit;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment