public static function dump($var, $depth = 10, $highlight = false)
{
self::$_output = '';
self::$_objects = array();
self::$_depth = $depth;
self::dumpInternal($var, 0);
if ($highlight) {
$result = highlight_string("<?php\n" . self::$_output, true);
return preg_replace('/<\\?php<br \\/>/', '', $result, 1);
} else {
return self::$_output;
}
}