File tree Expand file tree Collapse file tree 4 files changed +312
-57
lines changed Expand file tree Collapse file tree 4 files changed +312
-57
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ void zend_dump_const(const zval *zv)
68
68
break ;
69
69
case IS_STRING :;
70
70
zend_string * escaped_string = php_repr_str (Z_STR_P (zv )-> val , Z_STR_P (zv )-> len );
71
- fprintf (stderr , " string(\"%s\" )" , ZSTR_VAL (escaped_string ));
71
+ fprintf (stderr , " string(%s )" , ZSTR_VAL (escaped_string ));
72
72
zend_string_release (escaped_string );
73
73
break ;
74
74
case IS_ARRAY :
Original file line number Diff line number Diff line change @@ -33,4 +33,4 @@ $_main:
33
33
; (lines=1, args=0, vars=0, tmps=0)
34
34
; (after optimizer)
35
35
; %s.php:1-21
36
- 0000 RETURN string("\x00\x01\x02\x03\x04\x05\x06\x07\x08 \t\n\x0b\x0c \r\x0e\x0f\n\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\n !\"#$%&'()*+,-./\n0123456789:;<=>?\n@ABCDEFGHIJKLMNO\nPQRSTUVWXYZ[\\]^_\n`abcdefghijklmno\npqrstuvwxyz{|}~\x7f\n\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\n\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\n\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\n\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\n\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\n\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\n\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\n\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff")
36
+ 0000 RETURN string("\x00\x01\x02\x03\x04\x05\x06\x07\b \t\n\x0b\f \r\x0e\x0f\n\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\n !\"#$%&'()*+,-./\n0123456789:;<=>?\n@ABCDEFGHIJKLMNO\nPQRSTUVWXYZ[\\]^_\n`abcdefghijklmno\npqrstuvwxyz{|}~\x7f\n\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\n\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\n\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\n\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\n\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\n\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\n\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\n\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff")
Original file line number Diff line number Diff line change
1
+ /*
2
+ +----------------------------------------------------------------------+
3
+ | Copyright (c) The PHP Group |
4
+ +----------------------------------------------------------------------+
5
+ | This source file is subject to version 3.01 of the PHP license, |
6
+ | that is bundled with this package in the file LICENSE, and is |
7
+ | available through the world-wide-web at the following url: |
8
+ | https://www.php.net/license/3_01.txt |
9
+ | If you did not receive a copy of the PHP license and are unable to |
10
+ | obtain it through the world-wide-web, please send a note to |
11
+ | license@php.net so we can mail you a copy immediately. |
12
+ +----------------------------------------------------------------------+
13
+ | Author: Sascha Schumann <sascha@schumann.cx> |
14
+ +----------------------------------------------------------------------+
15
+ */
16
+
17
+ #ifndef STRING_H
18
+ #define STRING_H
19
+
20
+ typedef struct {
21
+ unsigned char ch ;
22
+ const char * repr ;
23
+ const unsigned char len ;
24
+ } char_repr_t ;
25
+
26
+ static const char_repr_t char_reprs [] = {
27
+ {'\x00' , "\\x00" , 4 },
28
+ {'\x01' , "\\x01" , 4 },
29
+ {'\x02' , "\\x02" , 4 },
30
+ {'\x03' , "\\x03" , 4 },
31
+ {'\x04' , "\\x04" , 4 },
32
+ {'\x05' , "\\x05" , 4 },
33
+ {'\x06' , "\\x06" , 4 },
34
+ {'\x07' , "\\x07" , 4 },
35
+ {'\b' , "\\b" , 2 },
36
+ {'\t' , "\\t" , 2 },
37
+ {'\n' , "\\n" , 2 },
38
+ {'\x0b' , "\\x0b" , 4 },
39
+ {'\f' , "\\f" , 2 },
40
+ {'\r' , "\\r" , 2 },
41
+ {'\x0e' , "\\x0e" , 4 },
42
+ {'\x0f' , "\\x0f" , 4 },
43
+ {'\x10' , "\\x10" , 4 },
44
+ {'\x11' , "\\x11" , 4 },
45
+ {'\x12' , "\\x12" , 4 },
46
+ {'\x13' , "\\x13" , 4 },
47
+ {'\x14' , "\\x14" , 4 },
48
+ {'\x15' , "\\x15" , 4 },
49
+ {'\x16' , "\\x16" , 4 },
50
+ {'\x17' , "\\x17" , 4 },
51
+ {'\x18' , "\\x18" , 4 },
52
+ {'\x19' , "\\x19" , 4 },
53
+ {'\x1a' , "\\x1a" , 4 },
54
+ {'\x1b' , "\\x1b" , 4 },
55
+ {'\x1c' , "\\x1c" , 4 },
56
+ {'\x1d' , "\\x1d" , 4 },
57
+ {'\x1e' , "\\x1e" , 4 },
58
+ {'\x1f' , "\\x1f" , 4 },
59
+ {' ' , " " , 1 },
60
+ {'!' , "!" , 1 },
61
+ {'"' , "\\\"" , 2 },
62
+ {'#' , "#" , 1 },
63
+ {'$' , "$" , 1 },
64
+ {'%' , "%%" , 1 },
65
+ {'&' , "&" , 1 },
66
+ {'\'' , "\'" , 1 },
67
+ {'(' , "(" , 1 },
68
+ {')' , ")" , 1 },
69
+ {'*' , "*" , 1 },
70
+ {'+' , "+" , 1 },
71
+ {',' , "," , 1 },
72
+ {'-' , "-" , 1 },
73
+ {'.' , "." , 1 },
74
+ {'/' , "/" , 1 },
75
+ {'0' , "0" , 1 },
76
+ {'1' , "1" , 1 },
77
+ {'2' , "2" , 1 },
78
+ {'3' , "3" , 1 },
79
+ {'4' , "4" , 1 },
80
+ {'5' , "5" , 1 },
81
+ {'6' , "6" , 1 },
82
+ {'7' , "7" , 1 },
83
+ {'8' , "8" , 1 },
84
+ {'9' , "9" , 1 },
85
+ {':' , ":" , 1 },
86
+ {';' , ";" , 1 },
87
+ {'<' , "<" , 1 },
88
+ {'=' , "=" , 1 },
89
+ {'>' , ">" , 1 },
90
+ {'?' , "?" , 1 },
91
+ {'@' , "@" , 1 },
92
+ {'A' , "A" , 1 },
93
+ {'B' , "B" , 1 },
94
+ {'C' , "C" , 1 },
95
+ {'D' , "D" , 1 },
96
+ {'E' , "E" , 1 },
97
+ {'F' , "F" , 1 },
98
+ {'G' , "G" , 1 },
99
+ {'H' , "H" , 1 },
100
+ {'I' , "I" , 1 },
101
+ {'J' , "J" , 1 },
102
+ {'K' , "K" , 1 },
103
+ {'L' , "L" , 1 },
104
+ {'M' , "M" , 1 },
105
+ {'N' , "N" , 1 },
106
+ {'O' , "O" , 1 },
107
+ {'P' , "P" , 1 },
108
+ {'Q' , "Q" , 1 },
109
+ {'R' , "R" , 1 },
110
+ {'S' , "S" , 1 },
111
+ {'T' , "T" , 1 },
112
+ {'U' , "U" , 1 },
113
+ {'V' , "V" , 1 },
114
+ {'W' , "W" , 1 },
115
+ {'X' , "X" , 1 },
116
+ {'Y' , "Y" , 1 },
117
+ {'Z' , "Z" , 1 },
118
+ {'[' , "[" , 1 },
119
+ {'\\' , "\\\\" , 2 },
120
+ {']' , "]" , 1 },
121
+ {'^' , "^" , 1 },
122
+ {'_' , "_" , 1 },
123
+ {'`' , "`" , 1 },
124
+ {'a' , "a" , 1 },
125
+ {'b' , "b" , 1 },
126
+ {'c' , "c" , 1 },
127
+ {'d' , "d" , 1 },
128
+ {'e' , "e" , 1 },
129
+ {'f' , "f" , 1 },
130
+ {'g' , "g" , 1 },
131
+ {'h' , "h" , 1 },
132
+ {'i' , "i" , 1 },
133
+ {'j' , "j" , 1 },
134
+ {'k' , "k" , 1 },
135
+ {'l' , "l" , 1 },
136
+ {'m' , "m" , 1 },
137
+ {'n' , "n" , 1 },
138
+ {'o' , "o" , 1 },
139
+ {'p' , "p" , 1 },
140
+ {'q' , "q" , 1 },
141
+ {'r' , "r" , 1 },
142
+ {'s' , "s" , 1 },
143
+ {'t' , "t" , 1 },
144
+ {'u' , "u" , 1 },
145
+ {'v' , "v" , 1 },
146
+ {'w' , "w" , 1 },
147
+ {'x' , "x" , 1 },
148
+ {'y' , "y" , 1 },
149
+ {'z' , "z" , 1 },
150
+ {'{' , "{" , 1 },
151
+ {'|' , "|" , 1 },
152
+ {'}' , "}" , 1 },
153
+ {'~' , "~" , 1 },
154
+ {'\x7f' , "\\x7f" , 4 },
155
+ {'\x80' , "\\x80" , 4 },
156
+ {'\x81' , "\\x81" , 4 },
157
+ {'\x82' , "\\x82" , 4 },
158
+ {'\x83' , "\\x83" , 4 },
159
+ {'\x84' , "\\x84" , 4 },
160
+ {'\x85' , "\\x85" , 4 },
161
+ {'\x86' , "\\x86" , 4 },
162
+ {'\x87' , "\\x87" , 4 },
163
+ {'\x88' , "\\x88" , 4 },
164
+ {'\x89' , "\\x89" , 4 },
165
+ {'\x8a' , "\\x8a" , 4 },
166
+ {'\x8b' , "\\x8b" , 4 },
167
+ {'\x8c' , "\\x8c" , 4 },
168
+ {'\x8d' , "\\x8d" , 4 },
169
+ {'\x8e' , "\\x8e" , 4 },
170
+ {'\x8f' , "\\x8f" , 4 },
171
+ {'\x90' , "\\x90" , 4 },
172
+ {'\x91' , "\\x91" , 4 },
173
+ {'\x92' , "\\x92" , 4 },
174
+ {'\x93' , "\\x93" , 4 },
175
+ {'\x94' , "\\x94" , 4 },
176
+ {'\x95' , "\\x95" , 4 },
177
+ {'\x96' , "\\x96" , 4 },
178
+ {'\x97' , "\\x97" , 4 },
179
+ {'\x98' , "\\x98" , 4 },
180
+ {'\x99' , "\\x99" , 4 },
181
+ {'\x9a' , "\\x9a" , 4 },
182
+ {'\x9b' , "\\x9b" , 4 },
183
+ {'\x9c' , "\\x9c" , 4 },
184
+ {'\x9d' , "\\x9d" , 4 },
185
+ {'\x9e' , "\\x9e" , 4 },
186
+ {'\x9f' , "\\x9f" , 4 },
187
+ {'\xa0' , "\\xa0" , 4 },
188
+ {'\xa1' , "\\xa1" , 4 },
189
+ {'\xa2' , "\\xa2" , 4 },
190
+ {'\xa3' , "\\xa3" , 4 },
191
+ {'\xa4' , "\\xa4" , 4 },
192
+ {'\xa5' , "\\xa5" , 4 },
193
+ {'\xa6' , "\\xa6" , 4 },
194
+ {'\xa7' , "\\xa7" , 4 },
195
+ {'\xa8' , "\\xa8" , 4 },
196
+ {'\xa9' , "\\xa9" , 4 },
197
+ {'\xaa' , "\\xaa" , 4 },
198
+ {'\xab' , "\\xab" , 4 },
199
+ {'\xac' , "\\xac" , 4 },
200
+ {'\xad' , "\\xad" , 4 },
201
+ {'\xae' , "\\xae" , 4 },
202
+ {'\xaf' , "\\xaf" , 4 },
203
+ {'\xb0' , "\\xb0" , 4 },
204
+ {'\xb1' , "\\xb1" , 4 },
205
+ {'\xb2' , "\\xb2" , 4 },
206
+ {'\xb3' , "\\xb3" , 4 },
207
+ {'\xb4' , "\\xb4" , 4 },
208
+ {'\xb5' , "\\xb5" , 4 },
209
+ {'\xb6' , "\\xb6" , 4 },
210
+ {'\xb7' , "\\xb7" , 4 },
211
+ {'\xb8' , "\\xb8" , 4 },
212
+ {'\xb9' , "\\xb9" , 4 },
213
+ {'\xba' , "\\xba" , 4 },
214
+ {'\xbb' , "\\xbb" , 4 },
215
+ {'\xbc' , "\\xbc" , 4 },
216
+ {'\xbd' , "\\xbd" , 4 },
217
+ {'\xbe' , "\\xbe" , 4 },
218
+ {'\xbf' , "\\xbf" , 4 },
219
+ {'\xc0' , "\\xc0" , 4 },
220
+ {'\xc1' , "\\xc1" , 4 },
221
+ {'\xc2' , "\\xc2" , 4 },
222
+ {'\xc3' , "\\xc3" , 4 },
223
+ {'\xc4' , "\\xc4" , 4 },
224
+ {'\xc5' , "\\xc5" , 4 },
225
+ {'\xc6' , "\\xc6" , 4 },
226
+ {'\xc7' , "\\xc7" , 4 },
227
+ {'\xc8' , "\\xc8" , 4 },
228
+ {'\xc9' , "\\xc9" , 4 },
229
+ {'\xca' , "\\xca" , 4 },
230
+ {'\xcb' , "\\xcb" , 4 },
231
+ {'\xcc' , "\\xcc" , 4 },
232
+ {'\xcd' , "\\xcd" , 4 },
233
+ {'\xce' , "\\xce" , 4 },
234
+ {'\xcf' , "\\xcf" , 4 },
235
+ {'\xd0' , "\\xd0" , 4 },
236
+ {'\xd1' , "\\xd1" , 4 },
237
+ {'\xd2' , "\\xd2" , 4 },
238
+ {'\xd3' , "\\xd3" , 4 },
239
+ {'\xd4' , "\\xd4" , 4 },
240
+ {'\xd5' , "\\xd5" , 4 },
241
+ {'\xd6' , "\\xd6" , 4 },
242
+ {'\xd7' , "\\xd7" , 4 },
243
+ {'\xd8' , "\\xd8" , 4 },
244
+ {'\xd9' , "\\xd9" , 4 },
245
+ {'\xda' , "\\xda" , 4 },
246
+ {'\xdb' , "\\xdb" , 4 },
247
+ {'\xdc' , "\\xdc" , 4 },
248
+ {'\xdd' , "\\xdd" , 4 },
249
+ {'\xde' , "\\xde" , 4 },
250
+ {'\xdf' , "\\xdf" , 4 },
251
+ {'\xe0' , "\\xe0" , 4 },
252
+ {'\xe1' , "\\xe1" , 4 },
253
+ {'\xe2' , "\\xe2" , 4 },
254
+ {'\xe3' , "\\xe3" , 4 },
255
+ {'\xe4' , "\\xe4" , 4 },
256
+ {'\xe5' , "\\xe5" , 4 },
257
+ {'\xe6' , "\\xe6" , 4 },
258
+ {'\xe7' , "\\xe7" , 4 },
259
+ {'\xe8' , "\\xe8" , 4 },
260
+ {'\xe9' , "\\xe9" , 4 },
261
+ {'\xea' , "\\xea" , 4 },
262
+ {'\xeb' , "\\xeb" , 4 },
263
+ {'\xec' , "\\xec" , 4 },
264
+ {'\xed' , "\\xed" , 4 },
265
+ {'\xee' , "\\xee" , 4 },
266
+ {'\xef' , "\\xef" , 4 },
267
+ {'\xf0' , "\\xf0" , 4 },
268
+ {'\xf1' , "\\xf1" , 4 },
269
+ {'\xf2' , "\\xf2" , 4 },
270
+ {'\xf3' , "\\xf3" , 4 },
271
+ {'\xf4' , "\\xf4" , 4 },
272
+ {'\xf5' , "\\xf5" , 4 },
273
+ {'\xf6' , "\\xf6" , 4 },
274
+ {'\xf7' , "\\xf7" , 4 },
275
+ {'\xf8' , "\\xf8" , 4 },
276
+ {'\xf9' , "\\xf9" , 4 },
277
+ {'\xfa' , "\\xfa" , 4 },
278
+ {'\xfb' , "\\xfb" , 4 },
279
+ {'\xfc' , "\\xfc" , 4 },
280
+ {'\xfd' , "\\xfd" , 4 },
281
+ {'\xfe' , "\\xfe" , 4 },
282
+ {'\xff' , "\\xff" , 4 },
283
+ };
284
+
285
+ #endif
You can’t perform that action at this time.
0 commit comments