src/DataCollector/EasyAdminDataCollector.php
public function dump($variable)
    {
        if (\class_exists(HtmlDumper::class)) {
            $cloner = new VarCloner();
            $dumper = new HtmlDumper();

            $dumper->dump($cloner->cloneVar($variable), $output = \fopen('php://memory', 'r+b'));
            if (false !== $dumpedData = \stream_get_contents($output, -1, 0)) {
                return $dumpedData;
            }
        }

        if (\class_exists(Yaml::class)) {
            return \sprintf('<pre class="sf-dump">%s</pre>', Yaml::dump((array) $variable, 1024));
        }

        return \sprintf('<pre class="sf-dump">%s</pre>', \var_export($variable, true));
    }
public function dump($variable)
    {
        if (\class_exists(HtmlDumper::class)) {
            $cloner = new VarCloner();
            $dumper = new HtmlDumper();

            $dumper->dump($cloner->cloneVar($variable), $output = \fopen('php://memory', 'r+b'));
            if (false !== $dumpedData = \stream_get_contents($output, -1, 0)) {
                return $dumpedData;
            }
        }

        if (\class_exists(Yaml::class)) {
            return \sprintf('<pre class="sf-dump">%s</pre>', Yaml::dump((array) $variable, 1024));
        }

        return \sprintf('<pre class="sf-dump">%s</pre>', \var_export($variable, true));
    }
It dumps the contents of the given variable. It tries several dumpers in
turn (VarDumper component, Yaml::dump, etc.) and if none is available, it
falls back to PHP's var_export().

@param mixed $variable

@return string