Last active
November 1, 2017 16:35
-
-
Save efreed/2a96b3aa5295e788e992 to your computer and use it in GitHub Desktop.
print_r; die;
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
/** | |
* print_r and die. Pass any number of params, each one will be separated by an hr | |
**/ | |
function prd() { | |
while(ob_get_level()) | |
ob_end_flush(); | |
foreach (func_get_args() as $i => $arg) { | |
echo $i?'<hr>':'<pre>'; | |
if ($arg === null) echo '<span style="background-color:#333;color:#FFF;">null</span>'; | |
else if ($arg === true) echo '<span style="background-color:#333;color:#FFF;">true</span>'; | |
else if ($arg === false) echo '<span style="background-color:#333;color:#FFF;">false</span>'; | |
else print_r($arg); | |
} | |
exit; | |
} |
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
/** | |
* var_dump and die. Pass any number of params, each one will be separated by an hr | |
**/ | |
function vdd() { | |
while(ob_get_level()) | |
ob_end_flush(); | |
foreach (func_get_args() as $i => $arg) { | |
echo $i?'<hr>':'<pre>'; | |
var_dump($arg); | |
} | |
exit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment