Last active
August 17, 2019 07:25
-
-
Save kingofnull/2ab18d2ad2c422dcea01a89200e6cec7 to your computer and use it in GitHub Desktop.
Simple PHP DD function var_dump and die replacement with reporting location and multiple input,
This file contains 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 | |
if(!function_exists('dd')){ | |
function dd(){ | |
$call=( debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS)[0]); | |
echo "<pre>\n### {$call['file']}:{$call['line']} ###\n"; | |
call_user_func_array("var_dump",func_get_args()) ;die; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment