Skip to content

Instantly share code, notes, and snippets.

@dellow
Last active August 29, 2015 14:18
Show Gist options
  • Save dellow/86058e9d8311ea5cd537 to your computer and use it in GitHub Desktop.
Save dellow/86058e9d8311ea5cd537 to your computer and use it in GitHub Desktop.
Better print_r() for debugging purposes.
/**
* p
* Better print_r() for debugging purposes.
*
* @since 1.0.0
* @version 1.0.0
**/
function p($data){
$debug = debug_backtrace();
print "<pre>";
echo "File: " . $debug[0]['file'] . " | Line: " . $debug[0]['line'] . "\n\n";
print_r($data);
print "</pre>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment