summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2010-11-04 16:28:10 +0000
committerUrban Müller2010-11-04 16:28:10 +0000
commit0b71f9f37f6f30890a478e127802a2912f71be74 (patch)
tree0e32c065229c0030e25997708b89f12437399876
parent73fd376c51852805a2832896cea33bad9009c6d3 (diff)
downloaditools-0b71f9f37f6f30890a478e127802a2912f71be74.tar.gz
itools-0b71f9f37f6f30890a478e127802a2912f71be74.tar.bz2
itools-0b71f9f37f6f30890a478e127802a2912f71be74.zip
safer date output
-rw-r--r--it_debug.class1
1 files changed, 1 insertions, 0 deletions
diff --git a/it_debug.class b/it_debug.class
index b7213d5..9d2ff5d 100644
--- a/it_debug.class
+++ b/it_debug.class
@@ -141,6 +141,7 @@ function dump($args)
$item = $head . "class $classname { $values }$tail";
}
+ $item = preg_replace('/\b(1[234]\d\d\d\d\d\d\d\d)\b(.*)/e', "'$1$2 # ' . date('Y-m-d H:i:s', '$1')", $item);
$item = preg_replace("#(=>?)\s*\n\s*(array|class)#", '$1 $2', $item); # array( and class on same line as key
$item = preg_replace('#array \(\s+([^({,;]+),\s+\)#', 'array( $1 )', $item); # 1-element arrays on 1 line
$item = preg_replace('#class (\S+) \{\s+([^({,;]+;)?\s+\}#', 'class $1 { $2 }', $item); # 1-element objects on 1 line