Last active
August 29, 2015 14:18
-
-
Save dellow/86058e9d8311ea5cd537 to your computer and use it in GitHub Desktop.
Better print_r() for debugging purposes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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