public static function dump($var)
    {
        $flags = 0;

        if (Config::get('debug.dump_show_string_length')) {
            $flags = $flags | AbstractDumper::DUMP_STRING_LENGTH;
        }

        $cloner = new VarCloner();

        if (! \in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) {
            $dumper = new HtmlDumper(null, null, $flags);

            $dumper->setStyles(self::get_styles());

            if (Config::get('debug.dump_include_trace')) {
                $dumper->setDumpBoundaries(
                    '<pre class=sf-dump id=%s data-indent-pad="%s">' . self::additional_output(),
                    '</pre><script>Sfdump(%s)</script>'
                );
            }
        } else {
            $dumper = new CliDumper(null, null, $flags);
        }

        $dumper->dump($cloner->cloneVar($var));
    }