Skip to content

Instantly share code, notes, and snippets.

@jeremykendall
Created October 30, 2012 14:56
Show Gist options
  • Save jeremykendall/3980694 to your computer and use it in GitHub Desktop.
Save jeremykendall/3980694 to your computer and use it in GitHub Desktop.
Global debug functions
/**
* Dumps information about a variable. Convenience wrapper for var_dump()
*
* @param mixed $expression The variable you want to dump.
* @param mixed $expression,... unlimited OPTIONAL number of additional variables to display with d()
* @return void
*/
function d($expression) {
var_dump($expression);
}
/**
* Dumps information about a variable and halts execution. Wraps d() and adds die()
*
* @param mixed $expression The variable you want to dump
* @param mixed $expression,... Unlimited OPTIONAL number of additional variables to display with dd()
*/
function dd($expression) {
d($expression);
die();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment