Skip to content

Instantly share code, notes, and snippets.

@kingofnull
Last active August 17, 2019 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kingofnull/2ab18d2ad2c422dcea01a89200e6cec7 to your computer and use it in GitHub Desktop.
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,
<?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