Created
February 10, 2015 16:45
-
-
Save mathiasgrimm/8ba480eb5008fc84e8ba to your computer and use it in GitHub Desktop.
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
if ( ! function_exists('dd')) | |
{ | |
/** | |
* Dump the passed variables and end the script. | |
* | |
* @param mixed | |
* @return void | |
*/ | |
function dd() | |
{ | |
$dbt = debug_backtrace(); | |
$lb = PHP_SAPI == 'cli' ? "\n" : "<br>"; | |
echo 'File: ' . $dbt[0]['file'] . ':' . $dbt[0]['line'] . $lb; | |
array_map(function($x) { var_dump($x); }, func_get_args()); die; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment