You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
555 B
PHP
27 lines
555 B
PHP
<?php
|
|
|
|
namespace Illuminate\Support\Debug;
|
|
|
|
use Symfony\Component\VarDumper\Dumper\CliDumper;
|
|
use Symfony\Component\VarDumper\Cloner\VarCloner;
|
|
|
|
class Dumper
|
|
{
|
|
/**
|
|
* Dump a value with elegance.
|
|
*
|
|
* @param mixed $value
|
|
* @return void
|
|
*/
|
|
public function dump($value)
|
|
{
|
|
if (class_exists(CliDumper::class)) {
|
|
$dumper = 'cli' === PHP_SAPI ? new CliDumper : new HtmlDumper;
|
|
|
|
$dumper->dump((new VarCloner)->cloneVar($value));
|
|
} else {
|
|
var_dump($value);
|
|
}
|
|
}
|
|
}
|