Last active
August 10, 2017 12:39
-
-
Save davebarnwell/797f9f71547844fba23a973e9c76d5f3 to your computer and use it in GitHub Desktop.
PHP dump args in pre tag and 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
<?php | |
/** | |
* dump args surrounded in html pre block and die | |
* | |
* @param mixed $args,... variable number of arguments | |
*/ | |
function dd() { | |
echo '<pre>'; | |
call_user_func_array('var_dump',func_get_args()); | |
echo '</pre>'; | |
die; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment