Skip to content

Instantly share code, notes, and snippets.

@sineld sineld/helpers.php
Created Jul 25, 2012

Embed
What would you like to do?
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
You can’t perform that action at this time.