Created
July 25, 2012 07:18
-
-
Save sineld/3174896 to your computer and use it in GitHub Desktop.
My dd replace
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 | |
/** | |
* Dump the given value and kill the script or continue. | |
* | |
* <code> | |
* // Dump the $data variable and kill the script | |
* d($data); | |
* | |
* // Dump the $data variable and continue the script | |
* d($data,1); | |
* </code> | |
* | |
* @param mixed $value | |
* @param bool $continue | |
* @return void | |
*/ | |
function d($value, $continue = null) | |
{ | |
echo "<pre>\n"; | |
var_dump($value); | |
echo "</pre>\n"; | |
if(!$continue) | |
die(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment