diff options
author | Urban Müller | 2023-01-17 18:10:14 +0100 |
---|---|---|
committer | Urban Müller | 2023-01-17 18:10:14 +0100 |
commit | 3e6c8e296d3337e54bf96ef15477453937bc0d09 (patch) | |
tree | 73ae81236198ac2af4acbf33b6e6e1f370f9d11e | |
parent | 056614f0f59f5ee5d633b0e4e48fe5edec6dd3cb (diff) | |
download | itools-3e6c8e296d3337e54bf96ef15477453937bc0d09.tar.gz itools-3e6c8e296d3337e54bf96ef15477453937bc0d09.tar.bz2 itools-3e6c8e296d3337e54bf96ef15477453937bc0d09.zip |
adapt to backslashes used in php 8.2
-rw-r--r-- | it_debug.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_debug.class b/it_debug.class index 3361933..c1ee8e1 100644 --- a/it_debug.class +++ b/it_debug.class @@ -180,7 +180,7 @@ static function dump($args, $p = []) } $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); - $item = preg_replace("#(=>?)\s*\n\s*(array|class)#", '$1 $2', $item); # array( and class on same line as key + $item = preg_replace("#(=>?)\s*\n\s*\\\?(array|class|\w+::)#", '$1 $2', $item); # array( and class on same line as key $item = preg_replace_callback('#array \(\s+([^(){};]{1,100}),\s+\)#', function($m) { return "array (" . preg_replace("#\n\s+#", " ", $m[1]) . ")"; }, $item); # short arrays on 1 line $item = preg_replace('#class (\S+) \{\s+([^({,;]+;)?\s+\}#', 'class $1 { $2 }', $item); # 1-element objects on 1 line #$item = preg_replace('#\{\s*var \$attr#', '{ var $attr', $item); # move $attr on same line |