File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -51,17 +51,15 @@ private static function _dump(&$var, $level = 0)
51
51
} elseif (is_string ($ var ) && (preg_match ('#[^\x09\x20-\x7E\xA0-\x{10FFFF}]#u ' , $ var ) || preg_last_error ())) {
52
52
static $ table ;
53
53
if ($ table === NULL ) {
54
- foreach (range ("\x00" , "\xFF" ) as $ ch ) {
55
- $ table [$ ch ] = ord ($ ch ) < 32 || ord ($ ch ) >= 127
56
- ? '\\x ' . str_pad (dechex (ord ($ ch )), 2 , '0 ' , STR_PAD_LEFT )
57
- : $ ch ;
54
+ foreach (array_merge (range ("\x00" , "\x1F" ), range ("\x7F" , "\xFF" )) as $ ch ) {
55
+ $ table [$ ch ] = '\x ' . str_pad (dechex (ord ($ ch )), 2 , '0 ' , STR_PAD_LEFT );
58
56
}
57
+ $ table ['\\' ] = '\\\\' ;
59
58
$ table ["\r" ] = '\r ' ;
60
59
$ table ["\n" ] = '\n ' ;
61
60
$ table ["\t" ] = '\t ' ;
62
- $ table ['$ ' ] = '\\$ ' ;
63
- $ table ['\\' ] = '\\\\' ;
64
- $ table ['" ' ] = '\\" ' ;
61
+ $ table ['$ ' ] = '\$ ' ;
62
+ $ table ['" ' ] = '\" ' ;
65
63
}
66
64
return '" ' . strtr ($ var , $ table ) . '" ' ;
67
65
You can’t perform that action at this time.
0 commit comments