Skip to content

Instantly share code, notes, and snippets.

@TerrePorter
Created January 8, 2016 21:01
Show Gist options
  • Save TerrePorter/a3b2eceff35636705308 to your computer and use it in GitHub Desktop.
Save TerrePorter/a3b2eceff35636705308 to your computer and use it in GitHub Desktop.
Inline version of laravel dd, dump without die
<?php
if ( ! function_exists('ddd'))
{
/**
* Dump the passed variables and end the script.
*
* @param mixed
* @return void
*/
function ddd($v, $asString = false)
{
if (!$asString) {
array_map(function ($x) {
(new Illuminate\Support\Debug\Dumper)->dump($x);
}, [$v]);
} else {
$r = array_map(function ($x) {
return (new App\Library\Classes\Dumper)->dump($x);
}, [$v]);
return $r[0];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment