Skip to content

Instantly share code, notes, and snippets.

@sineld
Created July 25, 2012 07:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sineld/3174896 to your computer and use it in GitHub Desktop.
Save sineld/3174896 to your computer and use it in GitHub Desktop.
My dd replace
<?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