summaryrefslogtreecommitdiff
path: root/it_debug.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_debug.class')
-rw-r--r--it_debug.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it_debug.class b/it_debug.class
index 3361933..91342bd 100644
--- a/it_debug.class
+++ b/it_debug.class
@@ -170,13 +170,13 @@ static function dump($args, $p = [])
$var = array_shift($argnames);
$item = gettype($arg) == 'resource' || is_array($arg) && isset($arg['GLOBALS']) || is_object($arg) && is_a($arg, "SimpleXMLElement") ? trim(print_r($arg, true)) : trim(var_export($arg, true));
- # Replace PHP 5 var_export object representation by old style
+ # Replace PHP 5+ var_export object representation by old readable style
while (preg_match("#(.*\b)(\w+)::__set_state\(array\(([^()]+)\)\)(.*)#s", $item, $regs) && ++$iterations < 100)
{
list (, $head, $classname, $values, $tail) = $regs;
$classname = strtolower($classname);
$values = preg_replace("#'(\w+)' =>\s*([^\n]+),#", 'var \$$1 = $2;', $values);
- $item = $head . "class $classname { $values }$tail";
+ $item = rtrim($head, '\\') . "class $classname {" . $values . "}" . $tail;
}
$item = preg_replace_callback('/\b(1[2-9]\d\d\d\d\d\d\d\d)\b(.*)/', function($m) { return $m[1] . $m[2] . " # " . date('Y-m-d H:i:s', $m[1]); }, $item);
@@ -211,7 +211,7 @@ static function dump($args, $p = [])
if ($p['html'])
return "<pre title='$title' style='color:#c00; text-align:left; background:white; border-bottom:1px solid #ddd; z-index:9999; position:relative; line-height:1'>$r</pre>\n";
else
- return $ansiok || $p['short'] ? "$r\n" : "\xe2\x96\x88\xe2\x96\x8c" . preg_replace("#\n#", "\n\xe2\x96\x88 ", "$r") . "\n";
+ return $ansiok || $p['short'] || EDC('edplain') ? "$r\n" : "\u{2588}\u{258c}" . preg_replace("#\n#", "\n\u{2588} ", "$r") . "\n";
}
/**