Created
October 30, 2012 14:56
-
-
Save jeremykendall/3980694 to your computer and use it in GitHub Desktop.
Global debug functions
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
/** | |
* 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