Chris@0
|
1 Error recovery
|
Chris@0
|
2 -----
|
Chris@0
|
3 <?php
|
Chris@0
|
4
|
Chris@0
|
5 foo()
|
Chris@0
|
6 bar()
|
Chris@0
|
7 baz()
|
Chris@0
|
8 -----
|
Chris@0
|
9 Syntax error, unexpected T_STRING from 4:1 to 4:3
|
Chris@0
|
10 Syntax error, unexpected T_STRING from 5:1 to 5:3
|
Chris@0
|
11 Syntax error, unexpected EOF from 5:6 to 5:6
|
Chris@0
|
12 array(
|
Chris@13
|
13 0: Stmt_Expression(
|
Chris@13
|
14 expr: Expr_FuncCall(
|
Chris@13
|
15 name: Name(
|
Chris@13
|
16 parts: array(
|
Chris@13
|
17 0: foo
|
Chris@13
|
18 )
|
Chris@13
|
19 )
|
Chris@13
|
20 args: array(
|
Chris@0
|
21 )
|
Chris@0
|
22 )
|
Chris@13
|
23 )
|
Chris@13
|
24 1: Stmt_Expression(
|
Chris@13
|
25 expr: Expr_FuncCall(
|
Chris@13
|
26 name: Name(
|
Chris@13
|
27 parts: array(
|
Chris@13
|
28 0: bar
|
Chris@13
|
29 )
|
Chris@13
|
30 )
|
Chris@13
|
31 args: array(
|
Chris@13
|
32 )
|
Chris@0
|
33 )
|
Chris@0
|
34 )
|
Chris@13
|
35 2: Stmt_Expression(
|
Chris@13
|
36 expr: Expr_FuncCall(
|
Chris@13
|
37 name: Name(
|
Chris@13
|
38 parts: array(
|
Chris@13
|
39 0: baz
|
Chris@13
|
40 )
|
Chris@0
|
41 )
|
Chris@13
|
42 args: array(
|
Chris@0
|
43 )
|
Chris@0
|
44 )
|
Chris@0
|
45 )
|
Chris@0
|
46 )
|
Chris@0
|
47 -----
|
Chris@0
|
48 <?php
|
Chris@0
|
49
|
Chris@0
|
50 foo()
|
Chris@0
|
51 bar();
|
Chris@0
|
52 baz();
|
Chris@0
|
53 -----
|
Chris@0
|
54 Syntax error, unexpected T_STRING from 4:1 to 4:3
|
Chris@0
|
55 array(
|
Chris@13
|
56 0: Stmt_Expression(
|
Chris@13
|
57 expr: Expr_FuncCall(
|
Chris@13
|
58 name: Name(
|
Chris@13
|
59 parts: array(
|
Chris@13
|
60 0: foo
|
Chris@13
|
61 )
|
Chris@13
|
62 )
|
Chris@13
|
63 args: array(
|
Chris@0
|
64 )
|
Chris@0
|
65 )
|
Chris@13
|
66 )
|
Chris@13
|
67 1: Stmt_Expression(
|
Chris@13
|
68 expr: Expr_FuncCall(
|
Chris@13
|
69 name: Name(
|
Chris@13
|
70 parts: array(
|
Chris@13
|
71 0: bar
|
Chris@13
|
72 )
|
Chris@13
|
73 )
|
Chris@13
|
74 args: array(
|
Chris@13
|
75 )
|
Chris@0
|
76 )
|
Chris@0
|
77 )
|
Chris@13
|
78 2: Stmt_Expression(
|
Chris@13
|
79 expr: Expr_FuncCall(
|
Chris@13
|
80 name: Name(
|
Chris@13
|
81 parts: array(
|
Chris@13
|
82 0: baz
|
Chris@13
|
83 )
|
Chris@0
|
84 )
|
Chris@13
|
85 args: array(
|
Chris@0
|
86 )
|
Chris@0
|
87 )
|
Chris@0
|
88 )
|
Chris@0
|
89 )
|
Chris@0
|
90 -----
|
Chris@0
|
91 <?php
|
Chris@0
|
92
|
Chris@0
|
93 foo();
|
Chris@0
|
94 bar()
|
Chris@0
|
95 baz();
|
Chris@0
|
96 -----
|
Chris@0
|
97 Syntax error, unexpected T_STRING from 5:1 to 5:3
|
Chris@0
|
98 array(
|
Chris@13
|
99 0: Stmt_Expression(
|
Chris@13
|
100 expr: Expr_FuncCall(
|
Chris@13
|
101 name: Name(
|
Chris@13
|
102 parts: array(
|
Chris@13
|
103 0: foo
|
Chris@13
|
104 )
|
Chris@13
|
105 )
|
Chris@13
|
106 args: array(
|
Chris@0
|
107 )
|
Chris@0
|
108 )
|
Chris@13
|
109 )
|
Chris@13
|
110 1: Stmt_Expression(
|
Chris@13
|
111 expr: Expr_FuncCall(
|
Chris@13
|
112 name: Name(
|
Chris@13
|
113 parts: array(
|
Chris@13
|
114 0: bar
|
Chris@13
|
115 )
|
Chris@13
|
116 )
|
Chris@13
|
117 args: array(
|
Chris@13
|
118 )
|
Chris@0
|
119 )
|
Chris@0
|
120 )
|
Chris@13
|
121 2: Stmt_Expression(
|
Chris@13
|
122 expr: Expr_FuncCall(
|
Chris@13
|
123 name: Name(
|
Chris@13
|
124 parts: array(
|
Chris@13
|
125 0: baz
|
Chris@13
|
126 )
|
Chris@0
|
127 )
|
Chris@13
|
128 args: array(
|
Chris@0
|
129 )
|
Chris@0
|
130 )
|
Chris@0
|
131 )
|
Chris@0
|
132 )
|
Chris@0
|
133 -----
|
Chris@0
|
134 <?php
|
Chris@0
|
135 abc;
|
Chris@0
|
136 1 + ;
|
Chris@0
|
137 -----
|
Chris@0
|
138 Syntax error, unexpected ';' from 3:5 to 3:5
|
Chris@0
|
139 array(
|
Chris@13
|
140 0: Stmt_Expression(
|
Chris@13
|
141 expr: Expr_ConstFetch(
|
Chris@13
|
142 name: Name(
|
Chris@13
|
143 parts: array(
|
Chris@13
|
144 0: abc
|
Chris@13
|
145 )
|
Chris@0
|
146 )
|
Chris@0
|
147 )
|
Chris@0
|
148 )
|
Chris@13
|
149 1: Stmt_Expression(
|
Chris@13
|
150 expr: Scalar_LNumber(
|
Chris@13
|
151 value: 1
|
Chris@13
|
152 )
|
Chris@0
|
153 )
|
Chris@0
|
154 )
|
Chris@0
|
155 -----
|
Chris@0
|
156 <?php
|
Chris@0
|
157 function test() {
|
Chris@0
|
158 1 +
|
Chris@0
|
159 }
|
Chris@0
|
160 -----
|
Chris@0
|
161 Syntax error, unexpected '}' from 4:1 to 4:1
|
Chris@0
|
162 array(
|
Chris@0
|
163 0: Stmt_Function(
|
Chris@0
|
164 byRef: false
|
Chris@13
|
165 name: Identifier(
|
Chris@13
|
166 name: test
|
Chris@13
|
167 )
|
Chris@0
|
168 params: array(
|
Chris@0
|
169 )
|
Chris@0
|
170 returnType: null
|
Chris@0
|
171 stmts: array(
|
Chris@13
|
172 0: Stmt_Expression(
|
Chris@13
|
173 expr: Scalar_LNumber(
|
Chris@13
|
174 value: 1
|
Chris@13
|
175 )
|
Chris@0
|
176 )
|
Chris@0
|
177 )
|
Chris@0
|
178 )
|
Chris@0
|
179 )
|
Chris@0
|
180 -----
|
Chris@0
|
181 <?php
|
Chris@0
|
182
|
Chris@0
|
183 $i = 0;
|
Chris@0
|
184 while
|
Chris@0
|
185
|
Chris@0
|
186 $j = 1;
|
Chris@0
|
187 $k = 2;
|
Chris@0
|
188 -----
|
Chris@0
|
189 Syntax error, unexpected T_VARIABLE, expecting '(' from 6:1 to 6:2
|
Chris@0
|
190 array(
|
Chris@13
|
191 0: Stmt_Expression(
|
Chris@13
|
192 expr: Expr_Assign(
|
Chris@13
|
193 var: Expr_Variable(
|
Chris@13
|
194 name: i
|
Chris@13
|
195 )
|
Chris@13
|
196 expr: Scalar_LNumber(
|
Chris@13
|
197 value: 0
|
Chris@13
|
198 )
|
Chris@0
|
199 )
|
Chris@0
|
200 )
|
Chris@13
|
201 1: Stmt_Expression(
|
Chris@13
|
202 expr: Expr_Assign(
|
Chris@13
|
203 var: Expr_Variable(
|
Chris@13
|
204 name: j
|
Chris@13
|
205 )
|
Chris@13
|
206 expr: Scalar_LNumber(
|
Chris@13
|
207 value: 1
|
Chris@13
|
208 )
|
Chris@0
|
209 )
|
Chris@0
|
210 )
|
Chris@13
|
211 2: Stmt_Expression(
|
Chris@13
|
212 expr: Expr_Assign(
|
Chris@13
|
213 var: Expr_Variable(
|
Chris@13
|
214 name: k
|
Chris@13
|
215 )
|
Chris@13
|
216 expr: Scalar_LNumber(
|
Chris@13
|
217 value: 2
|
Chris@13
|
218 )
|
Chris@0
|
219 )
|
Chris@0
|
220 )
|
Chris@0
|
221 )
|
Chris@0
|
222 -----
|
Chris@0
|
223 <?php
|
Chris@0
|
224
|
Chris@0
|
225 $i = 0;
|
Chris@0
|
226 while () {
|
Chris@0
|
227 $j = 1;
|
Chris@0
|
228 }
|
Chris@0
|
229 $k = 2;
|
Chris@0
|
230 // The output here drops the loop - would require Error node to handle this
|
Chris@0
|
231 -----
|
Chris@0
|
232 Syntax error, unexpected ')' from 4:8 to 4:8
|
Chris@0
|
233 array(
|
Chris@13
|
234 0: Stmt_Expression(
|
Chris@13
|
235 expr: Expr_Assign(
|
Chris@13
|
236 var: Expr_Variable(
|
Chris@13
|
237 name: i
|
Chris@13
|
238 )
|
Chris@13
|
239 expr: Scalar_LNumber(
|
Chris@13
|
240 value: 0
|
Chris@13
|
241 )
|
Chris@0
|
242 )
|
Chris@0
|
243 )
|
Chris@13
|
244 1: Stmt_Expression(
|
Chris@13
|
245 expr: Expr_Assign(
|
Chris@13
|
246 var: Expr_Variable(
|
Chris@13
|
247 name: j
|
Chris@13
|
248 )
|
Chris@13
|
249 expr: Scalar_LNumber(
|
Chris@13
|
250 value: 1
|
Chris@13
|
251 )
|
Chris@0
|
252 )
|
Chris@0
|
253 )
|
Chris@13
|
254 2: Stmt_Expression(
|
Chris@13
|
255 expr: Expr_Assign(
|
Chris@13
|
256 var: Expr_Variable(
|
Chris@13
|
257 name: k
|
Chris@13
|
258 )
|
Chris@13
|
259 expr: Scalar_LNumber(
|
Chris@13
|
260 value: 2
|
Chris@13
|
261 )
|
Chris@0
|
262 )
|
Chris@0
|
263 )
|
Chris@0
|
264 3: Stmt_Nop(
|
Chris@0
|
265 comments: array(
|
Chris@0
|
266 0: // The output here drops the loop - would require Error node to handle this
|
Chris@0
|
267 )
|
Chris@0
|
268 )
|
Chris@0
|
269 )
|
Chris@0
|
270 -----
|
Chris@0
|
271 <?php
|
Chris@0
|
272 // Can't recover this yet, as the '}' for the inner_statement_list
|
Chris@0
|
273 // is always required.
|
Chris@0
|
274
|
Chris@0
|
275 $i = 0;
|
Chris@0
|
276 while (true) {
|
Chris@0
|
277 $i = 1;
|
Chris@0
|
278 $i = 2;
|
Chris@0
|
279 -----
|
Chris@0
|
280 Syntax error, unexpected EOF from 8:12 to 8:12
|
Chris@0
|
281 -----
|
Chris@0
|
282 <?php
|
Chris@0
|
283 $foo->
|
Chris@0
|
284 ;
|
Chris@0
|
285 -----
|
Chris@0
|
286 !!positions
|
Chris@0
|
287 Syntax error, unexpected ';', expecting T_STRING or T_VARIABLE or '{' or '$' from 3:1 to 3:1
|
Chris@0
|
288 array(
|
Chris@13
|
289 0: Stmt_Expression[2:1 - 3:1](
|
Chris@13
|
290 expr: Expr_PropertyFetch[2:1 - 2:6](
|
Chris@13
|
291 var: Expr_Variable[2:1 - 2:4](
|
Chris@13
|
292 name: foo
|
Chris@13
|
293 )
|
Chris@13
|
294 name: Expr_Error[3:1 - 2:6](
|
Chris@13
|
295 )
|
Chris@0
|
296 )
|
Chris@0
|
297 )
|
Chris@0
|
298 )
|
Chris@0
|
299 -----
|
Chris@0
|
300 <?php
|
Chris@0
|
301 function foo() {
|
Chris@0
|
302 $bar->
|
Chris@0
|
303 }
|
Chris@0
|
304 -----
|
Chris@0
|
305 !!positions
|
Chris@0
|
306 Syntax error, unexpected '}', expecting T_STRING or T_VARIABLE or '{' or '$' from 4:1 to 4:1
|
Chris@0
|
307 array(
|
Chris@0
|
308 0: Stmt_Function[2:1 - 4:1](
|
Chris@0
|
309 byRef: false
|
Chris@13
|
310 name: Identifier[2:10 - 2:12](
|
Chris@13
|
311 name: foo
|
Chris@13
|
312 )
|
Chris@0
|
313 params: array(
|
Chris@0
|
314 )
|
Chris@0
|
315 returnType: null
|
Chris@0
|
316 stmts: array(
|
Chris@13
|
317 0: Stmt_Expression[3:5 - 3:10](
|
Chris@13
|
318 expr: Expr_PropertyFetch[3:5 - 3:10](
|
Chris@13
|
319 var: Expr_Variable[3:5 - 3:8](
|
Chris@13
|
320 name: bar
|
Chris@13
|
321 )
|
Chris@13
|
322 name: Expr_Error[4:1 - 3:10](
|
Chris@13
|
323 )
|
Chris@0
|
324 )
|
Chris@0
|
325 )
|
Chris@0
|
326 )
|
Chris@0
|
327 )
|
Chris@0
|
328 )
|
Chris@0
|
329 -----
|
Chris@0
|
330 <?php
|
Chris@0
|
331 new T
|
Chris@0
|
332 -----
|
Chris@0
|
333 Syntax error, unexpected EOF from 2:6 to 2:6
|
Chris@0
|
334 array(
|
Chris@13
|
335 0: Stmt_Expression(
|
Chris@13
|
336 expr: Expr_New(
|
Chris@13
|
337 class: Name(
|
Chris@13
|
338 parts: array(
|
Chris@13
|
339 0: T
|
Chris@13
|
340 )
|
Chris@0
|
341 )
|
Chris@13
|
342 args: array(
|
Chris@13
|
343 )
|
Chris@0
|
344 )
|
Chris@0
|
345 )
|
Chris@0
|
346 )
|
Chris@0
|
347 -----
|
Chris@0
|
348 <?php
|
Chris@0
|
349 new
|
Chris@0
|
350 -----
|
Chris@0
|
351 !!php7,positions
|
Chris@0
|
352 Syntax error, unexpected EOF from 2:4 to 2:4
|
Chris@0
|
353 array(
|
Chris@13
|
354 0: Stmt_Expression[2:1 - 2:3](
|
Chris@13
|
355 expr: Expr_New[2:1 - 2:3](
|
Chris@13
|
356 class: Expr_Error[2:4 - 2:3](
|
Chris@13
|
357 )
|
Chris@13
|
358 args: array(
|
Chris@13
|
359 )
|
Chris@0
|
360 )
|
Chris@0
|
361 )
|
Chris@0
|
362 )
|
Chris@0
|
363 -----
|
Chris@0
|
364 <?php
|
Chris@0
|
365 $foo instanceof
|
Chris@0
|
366 -----
|
Chris@0
|
367 !!php7
|
Chris@0
|
368 Syntax error, unexpected EOF from 2:16 to 2:16
|
Chris@0
|
369 array(
|
Chris@13
|
370 0: Stmt_Expression(
|
Chris@13
|
371 expr: Expr_Instanceof(
|
Chris@13
|
372 expr: Expr_Variable(
|
Chris@13
|
373 name: foo
|
Chris@13
|
374 )
|
Chris@13
|
375 class: Expr_Error(
|
Chris@13
|
376 )
|
Chris@0
|
377 )
|
Chris@0
|
378 )
|
Chris@0
|
379 )
|
Chris@0
|
380 -----
|
Chris@0
|
381 <?php
|
Chris@0
|
382 $
|
Chris@0
|
383 -----
|
Chris@0
|
384 !!php7
|
Chris@0
|
385 Syntax error, unexpected EOF, expecting T_VARIABLE or '{' or '$' from 2:2 to 2:2
|
Chris@0
|
386 array(
|
Chris@13
|
387 0: Stmt_Expression(
|
Chris@13
|
388 expr: Expr_Variable(
|
Chris@13
|
389 name: Expr_Error(
|
Chris@13
|
390 )
|
Chris@0
|
391 )
|
Chris@0
|
392 )
|
Chris@0
|
393 )
|
Chris@0
|
394 -----
|
Chris@0
|
395 <?php
|
Chris@0
|
396 Foo::$
|
Chris@0
|
397 -----
|
Chris@0
|
398 !!php7
|
Chris@0
|
399 Syntax error, unexpected EOF, expecting T_VARIABLE or '{' or '$' from 2:7 to 2:7
|
Chris@0
|
400 array(
|
Chris@13
|
401 0: Stmt_Expression(
|
Chris@13
|
402 expr: Expr_StaticPropertyFetch(
|
Chris@13
|
403 class: Name(
|
Chris@13
|
404 parts: array(
|
Chris@13
|
405 0: Foo
|
Chris@13
|
406 )
|
Chris@0
|
407 )
|
Chris@13
|
408 name: Expr_Error(
|
Chris@13
|
409 )
|
Chris@0
|
410 )
|
Chris@0
|
411 )
|
Chris@0
|
412 )
|
Chris@0
|
413 -----
|
Chris@0
|
414 <?php
|
Chris@0
|
415 Foo::
|
Chris@0
|
416 -----
|
Chris@0
|
417 !!php7
|
Chris@0
|
418 Syntax error, unexpected EOF from 2:6 to 2:6
|
Chris@0
|
419 array(
|
Chris@13
|
420 0: Stmt_Expression(
|
Chris@13
|
421 expr: Expr_ClassConstFetch(
|
Chris@13
|
422 class: Name(
|
Chris@13
|
423 parts: array(
|
Chris@13
|
424 0: Foo
|
Chris@13
|
425 )
|
Chris@0
|
426 )
|
Chris@13
|
427 name: Expr_Error(
|
Chris@13
|
428 )
|
Chris@0
|
429 )
|
Chris@0
|
430 )
|
Chris@0
|
431 )
|
Chris@0
|
432 -----
|
Chris@0
|
433 <?php
|
Chris@0
|
434 namespace Foo
|
Chris@0
|
435 use A
|
Chris@0
|
436 use function a
|
Chris@0
|
437 use A\{B}
|
Chris@0
|
438 const A = 1
|
Chris@0
|
439 break
|
Chris@0
|
440 break 2
|
Chris@0
|
441 continue
|
Chris@0
|
442 continue 2
|
Chris@0
|
443 return
|
Chris@0
|
444 return 2
|
Chris@0
|
445 echo $a
|
Chris@0
|
446 unset($a)
|
Chris@0
|
447 throw $x
|
Chris@0
|
448 goto label
|
Chris@0
|
449 -----
|
Chris@0
|
450 !!php7
|
Chris@0
|
451 Syntax error, unexpected T_USE, expecting ';' or '{' from 3:1 to 3:3
|
Chris@0
|
452 Syntax error, unexpected T_USE, expecting ';' from 5:1 to 5:3
|
Chris@0
|
453 Syntax error, unexpected T_CONST, expecting ';' from 6:1 to 6:5
|
Chris@0
|
454 Syntax error, unexpected T_BREAK, expecting ';' from 7:1 to 7:5
|
Chris@0
|
455 Syntax error, unexpected T_THROW, expecting ';' from 15:1 to 15:5
|
Chris@0
|
456 array(
|
Chris@0
|
457 0: Stmt_Namespace(
|
Chris@0
|
458 name: Name(
|
Chris@0
|
459 parts: array(
|
Chris@0
|
460 0: Foo
|
Chris@0
|
461 )
|
Chris@0
|
462 )
|
Chris@0
|
463 stmts: array(
|
Chris@0
|
464 0: Stmt_Use(
|
Chris@0
|
465 type: TYPE_NORMAL (1)
|
Chris@0
|
466 uses: array(
|
Chris@0
|
467 0: Stmt_UseUse(
|
Chris@0
|
468 type: TYPE_UNKNOWN (0)
|
Chris@0
|
469 name: Name(
|
Chris@0
|
470 parts: array(
|
Chris@0
|
471 0: A
|
Chris@0
|
472 )
|
Chris@0
|
473 )
|
Chris@13
|
474 alias: null
|
Chris@0
|
475 )
|
Chris@0
|
476 )
|
Chris@0
|
477 )
|
Chris@0
|
478 1: Stmt_Use(
|
Chris@0
|
479 type: TYPE_FUNCTION (2)
|
Chris@0
|
480 uses: array(
|
Chris@0
|
481 0: Stmt_UseUse(
|
Chris@0
|
482 type: TYPE_UNKNOWN (0)
|
Chris@0
|
483 name: Name(
|
Chris@0
|
484 parts: array(
|
Chris@0
|
485 0: a
|
Chris@0
|
486 )
|
Chris@0
|
487 )
|
Chris@13
|
488 alias: null
|
Chris@0
|
489 )
|
Chris@0
|
490 )
|
Chris@0
|
491 )
|
Chris@0
|
492 2: Stmt_GroupUse(
|
Chris@0
|
493 type: TYPE_UNKNOWN (0)
|
Chris@0
|
494 prefix: Name(
|
Chris@0
|
495 parts: array(
|
Chris@0
|
496 0: A
|
Chris@0
|
497 )
|
Chris@0
|
498 )
|
Chris@0
|
499 uses: array(
|
Chris@0
|
500 0: Stmt_UseUse(
|
Chris@0
|
501 type: TYPE_NORMAL (1)
|
Chris@0
|
502 name: Name(
|
Chris@0
|
503 parts: array(
|
Chris@0
|
504 0: B
|
Chris@0
|
505 )
|
Chris@0
|
506 )
|
Chris@13
|
507 alias: null
|
Chris@0
|
508 )
|
Chris@0
|
509 )
|
Chris@0
|
510 )
|
Chris@0
|
511 3: Stmt_Const(
|
Chris@0
|
512 consts: array(
|
Chris@0
|
513 0: Const(
|
Chris@13
|
514 name: Identifier(
|
Chris@13
|
515 name: A
|
Chris@13
|
516 )
|
Chris@0
|
517 value: Scalar_LNumber(
|
Chris@0
|
518 value: 1
|
Chris@0
|
519 )
|
Chris@0
|
520 )
|
Chris@0
|
521 )
|
Chris@0
|
522 )
|
Chris@0
|
523 4: Stmt_Break(
|
Chris@0
|
524 num: null
|
Chris@0
|
525 )
|
Chris@0
|
526 5: Stmt_Break(
|
Chris@0
|
527 num: Scalar_LNumber(
|
Chris@0
|
528 value: 2
|
Chris@0
|
529 )
|
Chris@0
|
530 )
|
Chris@0
|
531 6: Stmt_Continue(
|
Chris@0
|
532 num: null
|
Chris@0
|
533 )
|
Chris@0
|
534 7: Stmt_Continue(
|
Chris@0
|
535 num: Scalar_LNumber(
|
Chris@0
|
536 value: 2
|
Chris@0
|
537 )
|
Chris@0
|
538 )
|
Chris@0
|
539 8: Stmt_Return(
|
Chris@0
|
540 expr: null
|
Chris@0
|
541 )
|
Chris@0
|
542 9: Stmt_Return(
|
Chris@0
|
543 expr: Scalar_LNumber(
|
Chris@0
|
544 value: 2
|
Chris@0
|
545 )
|
Chris@0
|
546 )
|
Chris@0
|
547 10: Stmt_Echo(
|
Chris@0
|
548 exprs: array(
|
Chris@0
|
549 0: Expr_Variable(
|
Chris@0
|
550 name: a
|
Chris@0
|
551 )
|
Chris@0
|
552 )
|
Chris@0
|
553 )
|
Chris@0
|
554 11: Stmt_Unset(
|
Chris@0
|
555 vars: array(
|
Chris@0
|
556 0: Expr_Variable(
|
Chris@0
|
557 name: a
|
Chris@0
|
558 )
|
Chris@0
|
559 )
|
Chris@0
|
560 )
|
Chris@0
|
561 12: Stmt_Throw(
|
Chris@0
|
562 expr: Expr_Variable(
|
Chris@0
|
563 name: x
|
Chris@0
|
564 )
|
Chris@0
|
565 )
|
Chris@0
|
566 13: Stmt_Goto(
|
Chris@13
|
567 name: Identifier(
|
Chris@13
|
568 name: label
|
Chris@13
|
569 )
|
Chris@0
|
570 )
|
Chris@0
|
571 )
|
Chris@0
|
572 )
|
Chris@0
|
573 )
|
Chris@0
|
574 -----
|
Chris@0
|
575 <?php
|
Chris@0
|
576
|
Chris@0
|
577 use A\{B, };
|
Chris@0
|
578 use function A\{b, };
|
Chris@0
|
579 use A, ;
|
Chris@0
|
580 const A = 42, ;
|
Chris@0
|
581
|
Chris@0
|
582 class X implements Y, {
|
Chris@0
|
583 use A, ;
|
Chris@0
|
584 use A, {
|
Chris@0
|
585 A::b insteadof C, ;
|
Chris@0
|
586 }
|
Chris@0
|
587 const A = 42, ;
|
Chris@0
|
588 public $x, ;
|
Chris@0
|
589 }
|
Chris@0
|
590 interface I extends J, {}
|
Chris@0
|
591
|
Chris@0
|
592 unset($x, );
|
Chris@0
|
593 isset($x, );
|
Chris@0
|
594
|
Chris@0
|
595 declare(a=42, );
|
Chris@0
|
596
|
Chris@0
|
597 function foo($a, ) {}
|
Chris@0
|
598 foo($a, );
|
Chris@0
|
599 global $a, ;
|
Chris@0
|
600 static $a, ;
|
Chris@0
|
601 echo $a, ;
|
Chris@0
|
602
|
Chris@0
|
603 for ($a, ; $b, ; $c, );
|
Chris@0
|
604 function ($a, ) use ($b, ) {};
|
Chris@0
|
605 -----
|
Chris@0
|
606 !!php7
|
Chris@0
|
607 A trailing comma is not allowed here from 5:6 to 5:6
|
Chris@0
|
608 A trailing comma is not allowed here from 6:13 to 6:13
|
Chris@0
|
609 A trailing comma is not allowed here from 8:21 to 8:21
|
Chris@0
|
610 A trailing comma is not allowed here from 9:10 to 9:10
|
Chris@0
|
611 A trailing comma is not allowed here from 10:10 to 10:10
|
Chris@0
|
612 A trailing comma is not allowed here from 11:25 to 11:25
|
Chris@0
|
613 A trailing comma is not allowed here from 13:17 to 13:17
|
Chris@0
|
614 A trailing comma is not allowed here from 14:14 to 14:14
|
Chris@0
|
615 A trailing comma is not allowed here from 16:22 to 16:22
|
Chris@0
|
616 A trailing comma is not allowed here from 21:13 to 21:13
|
Chris@0
|
617 A trailing comma is not allowed here from 23:16 to 23:16
|
Chris@0
|
618 A trailing comma is not allowed here from 25:10 to 25:10
|
Chris@0
|
619 A trailing comma is not allowed here from 26:10 to 26:10
|
Chris@0
|
620 A trailing comma is not allowed here from 27:8 to 27:8
|
Chris@0
|
621 A trailing comma is not allowed here from 29:8 to 29:8
|
Chris@0
|
622 A trailing comma is not allowed here from 29:14 to 29:14
|
Chris@0
|
623 A trailing comma is not allowed here from 29:20 to 29:20
|
Chris@0
|
624 A trailing comma is not allowed here from 30:13 to 30:13
|
Chris@0
|
625 A trailing comma is not allowed here from 30:24 to 30:24
|
Chris@0
|
626 array(
|
Chris@0
|
627 0: Stmt_GroupUse(
|
Chris@0
|
628 type: TYPE_UNKNOWN (0)
|
Chris@0
|
629 prefix: Name(
|
Chris@0
|
630 parts: array(
|
Chris@0
|
631 0: A
|
Chris@0
|
632 )
|
Chris@0
|
633 )
|
Chris@0
|
634 uses: array(
|
Chris@0
|
635 0: Stmt_UseUse(
|
Chris@0
|
636 type: TYPE_NORMAL (1)
|
Chris@0
|
637 name: Name(
|
Chris@0
|
638 parts: array(
|
Chris@0
|
639 0: B
|
Chris@0
|
640 )
|
Chris@0
|
641 )
|
Chris@13
|
642 alias: null
|
Chris@0
|
643 )
|
Chris@0
|
644 )
|
Chris@0
|
645 )
|
Chris@0
|
646 1: Stmt_GroupUse(
|
Chris@0
|
647 type: TYPE_FUNCTION (2)
|
Chris@0
|
648 prefix: Name(
|
Chris@0
|
649 parts: array(
|
Chris@0
|
650 0: A
|
Chris@0
|
651 )
|
Chris@0
|
652 )
|
Chris@0
|
653 uses: array(
|
Chris@0
|
654 0: Stmt_UseUse(
|
Chris@0
|
655 type: TYPE_UNKNOWN (0)
|
Chris@0
|
656 name: Name(
|
Chris@0
|
657 parts: array(
|
Chris@0
|
658 0: b
|
Chris@0
|
659 )
|
Chris@0
|
660 )
|
Chris@13
|
661 alias: null
|
Chris@0
|
662 )
|
Chris@0
|
663 )
|
Chris@0
|
664 )
|
Chris@0
|
665 2: Stmt_Use(
|
Chris@0
|
666 type: TYPE_NORMAL (1)
|
Chris@0
|
667 uses: array(
|
Chris@0
|
668 0: Stmt_UseUse(
|
Chris@0
|
669 type: TYPE_UNKNOWN (0)
|
Chris@0
|
670 name: Name(
|
Chris@0
|
671 parts: array(
|
Chris@0
|
672 0: A
|
Chris@0
|
673 )
|
Chris@0
|
674 )
|
Chris@13
|
675 alias: null
|
Chris@0
|
676 )
|
Chris@0
|
677 )
|
Chris@0
|
678 )
|
Chris@0
|
679 3: Stmt_Const(
|
Chris@0
|
680 consts: array(
|
Chris@0
|
681 0: Const(
|
Chris@13
|
682 name: Identifier(
|
Chris@13
|
683 name: A
|
Chris@13
|
684 )
|
Chris@0
|
685 value: Scalar_LNumber(
|
Chris@0
|
686 value: 42
|
Chris@0
|
687 )
|
Chris@0
|
688 )
|
Chris@0
|
689 )
|
Chris@0
|
690 )
|
Chris@0
|
691 4: Stmt_Class(
|
Chris@0
|
692 flags: 0
|
Chris@13
|
693 name: Identifier(
|
Chris@13
|
694 name: X
|
Chris@13
|
695 )
|
Chris@0
|
696 extends: null
|
Chris@0
|
697 implements: array(
|
Chris@0
|
698 0: Name(
|
Chris@0
|
699 parts: array(
|
Chris@0
|
700 0: Y
|
Chris@0
|
701 )
|
Chris@0
|
702 )
|
Chris@0
|
703 )
|
Chris@0
|
704 stmts: array(
|
Chris@0
|
705 0: Stmt_TraitUse(
|
Chris@0
|
706 traits: array(
|
Chris@0
|
707 0: Name(
|
Chris@0
|
708 parts: array(
|
Chris@0
|
709 0: A
|
Chris@0
|
710 )
|
Chris@0
|
711 )
|
Chris@0
|
712 )
|
Chris@0
|
713 adaptations: array(
|
Chris@0
|
714 )
|
Chris@0
|
715 )
|
Chris@0
|
716 1: Stmt_TraitUse(
|
Chris@0
|
717 traits: array(
|
Chris@0
|
718 0: Name(
|
Chris@0
|
719 parts: array(
|
Chris@0
|
720 0: A
|
Chris@0
|
721 )
|
Chris@0
|
722 )
|
Chris@0
|
723 )
|
Chris@0
|
724 adaptations: array(
|
Chris@0
|
725 0: Stmt_TraitUseAdaptation_Precedence(
|
Chris@0
|
726 trait: Name(
|
Chris@0
|
727 parts: array(
|
Chris@0
|
728 0: A
|
Chris@0
|
729 )
|
Chris@0
|
730 )
|
Chris@13
|
731 method: Identifier(
|
Chris@13
|
732 name: b
|
Chris@13
|
733 )
|
Chris@0
|
734 insteadof: array(
|
Chris@0
|
735 0: Name(
|
Chris@0
|
736 parts: array(
|
Chris@0
|
737 0: C
|
Chris@0
|
738 )
|
Chris@0
|
739 )
|
Chris@0
|
740 )
|
Chris@0
|
741 )
|
Chris@0
|
742 )
|
Chris@0
|
743 )
|
Chris@0
|
744 2: Stmt_ClassConst(
|
Chris@0
|
745 flags: 0
|
Chris@0
|
746 consts: array(
|
Chris@0
|
747 0: Const(
|
Chris@13
|
748 name: Identifier(
|
Chris@13
|
749 name: A
|
Chris@13
|
750 )
|
Chris@0
|
751 value: Scalar_LNumber(
|
Chris@0
|
752 value: 42
|
Chris@0
|
753 )
|
Chris@0
|
754 )
|
Chris@0
|
755 )
|
Chris@0
|
756 )
|
Chris@0
|
757 3: Stmt_Property(
|
Chris@0
|
758 flags: MODIFIER_PUBLIC (1)
|
Chris@17
|
759 type: null
|
Chris@0
|
760 props: array(
|
Chris@0
|
761 0: Stmt_PropertyProperty(
|
Chris@13
|
762 name: VarLikeIdentifier(
|
Chris@13
|
763 name: x
|
Chris@13
|
764 )
|
Chris@0
|
765 default: null
|
Chris@0
|
766 )
|
Chris@0
|
767 )
|
Chris@0
|
768 )
|
Chris@0
|
769 )
|
Chris@0
|
770 )
|
Chris@0
|
771 5: Stmt_Interface(
|
Chris@13
|
772 name: Identifier(
|
Chris@13
|
773 name: I
|
Chris@13
|
774 )
|
Chris@0
|
775 extends: array(
|
Chris@0
|
776 0: Name(
|
Chris@0
|
777 parts: array(
|
Chris@0
|
778 0: J
|
Chris@0
|
779 )
|
Chris@0
|
780 )
|
Chris@0
|
781 )
|
Chris@0
|
782 stmts: array(
|
Chris@0
|
783 )
|
Chris@0
|
784 )
|
Chris@0
|
785 6: Stmt_Unset(
|
Chris@0
|
786 vars: array(
|
Chris@0
|
787 0: Expr_Variable(
|
Chris@0
|
788 name: x
|
Chris@0
|
789 )
|
Chris@0
|
790 )
|
Chris@0
|
791 )
|
Chris@13
|
792 7: Stmt_Expression(
|
Chris@13
|
793 expr: Expr_Isset(
|
Chris@13
|
794 vars: array(
|
Chris@13
|
795 0: Expr_Variable(
|
Chris@13
|
796 name: x
|
Chris@13
|
797 )
|
Chris@0
|
798 )
|
Chris@0
|
799 )
|
Chris@0
|
800 )
|
Chris@0
|
801 8: Stmt_Declare(
|
Chris@0
|
802 declares: array(
|
Chris@0
|
803 0: Stmt_DeclareDeclare(
|
Chris@13
|
804 key: Identifier(
|
Chris@13
|
805 name: a
|
Chris@13
|
806 )
|
Chris@0
|
807 value: Scalar_LNumber(
|
Chris@0
|
808 value: 42
|
Chris@0
|
809 )
|
Chris@0
|
810 )
|
Chris@0
|
811 )
|
Chris@0
|
812 stmts: null
|
Chris@0
|
813 )
|
Chris@0
|
814 9: Stmt_Function(
|
Chris@0
|
815 byRef: false
|
Chris@13
|
816 name: Identifier(
|
Chris@13
|
817 name: foo
|
Chris@13
|
818 )
|
Chris@0
|
819 params: array(
|
Chris@0
|
820 0: Param(
|
Chris@0
|
821 type: null
|
Chris@0
|
822 byRef: false
|
Chris@0
|
823 variadic: false
|
Chris@13
|
824 var: Expr_Variable(
|
Chris@13
|
825 name: a
|
Chris@13
|
826 )
|
Chris@0
|
827 default: null
|
Chris@0
|
828 )
|
Chris@0
|
829 )
|
Chris@0
|
830 returnType: null
|
Chris@0
|
831 stmts: array(
|
Chris@0
|
832 )
|
Chris@0
|
833 )
|
Chris@13
|
834 10: Stmt_Expression(
|
Chris@13
|
835 expr: Expr_FuncCall(
|
Chris@13
|
836 name: Name(
|
Chris@13
|
837 parts: array(
|
Chris@13
|
838 0: foo
|
Chris@13
|
839 )
|
Chris@0
|
840 )
|
Chris@13
|
841 args: array(
|
Chris@13
|
842 0: Arg(
|
Chris@13
|
843 value: Expr_Variable(
|
Chris@13
|
844 name: a
|
Chris@13
|
845 )
|
Chris@13
|
846 byRef: false
|
Chris@13
|
847 unpack: false
|
Chris@0
|
848 )
|
Chris@0
|
849 )
|
Chris@0
|
850 )
|
Chris@0
|
851 )
|
Chris@0
|
852 11: Stmt_Global(
|
Chris@0
|
853 vars: array(
|
Chris@0
|
854 0: Expr_Variable(
|
Chris@0
|
855 name: a
|
Chris@0
|
856 )
|
Chris@0
|
857 )
|
Chris@0
|
858 )
|
Chris@0
|
859 12: Stmt_Static(
|
Chris@0
|
860 vars: array(
|
Chris@0
|
861 0: Stmt_StaticVar(
|
Chris@13
|
862 var: Expr_Variable(
|
Chris@13
|
863 name: a
|
Chris@13
|
864 )
|
Chris@0
|
865 default: null
|
Chris@0
|
866 )
|
Chris@0
|
867 )
|
Chris@0
|
868 )
|
Chris@0
|
869 13: Stmt_Echo(
|
Chris@0
|
870 exprs: array(
|
Chris@0
|
871 0: Expr_Variable(
|
Chris@0
|
872 name: a
|
Chris@0
|
873 )
|
Chris@0
|
874 )
|
Chris@0
|
875 )
|
Chris@0
|
876 14: Stmt_For(
|
Chris@0
|
877 init: array(
|
Chris@0
|
878 0: Expr_Variable(
|
Chris@0
|
879 name: a
|
Chris@0
|
880 )
|
Chris@0
|
881 )
|
Chris@0
|
882 cond: array(
|
Chris@0
|
883 0: Expr_Variable(
|
Chris@0
|
884 name: b
|
Chris@0
|
885 )
|
Chris@0
|
886 )
|
Chris@0
|
887 loop: array(
|
Chris@0
|
888 0: Expr_Variable(
|
Chris@0
|
889 name: c
|
Chris@0
|
890 )
|
Chris@0
|
891 )
|
Chris@0
|
892 stmts: array(
|
Chris@0
|
893 )
|
Chris@0
|
894 )
|
Chris@13
|
895 15: Stmt_Expression(
|
Chris@13
|
896 expr: Expr_Closure(
|
Chris@13
|
897 static: false
|
Chris@13
|
898 byRef: false
|
Chris@13
|
899 params: array(
|
Chris@13
|
900 0: Param(
|
Chris@13
|
901 type: null
|
Chris@13
|
902 byRef: false
|
Chris@13
|
903 variadic: false
|
Chris@13
|
904 var: Expr_Variable(
|
Chris@13
|
905 name: a
|
Chris@13
|
906 )
|
Chris@13
|
907 default: null
|
Chris@13
|
908 )
|
Chris@0
|
909 )
|
Chris@13
|
910 uses: array(
|
Chris@13
|
911 0: Expr_ClosureUse(
|
Chris@13
|
912 var: Expr_Variable(
|
Chris@13
|
913 name: b
|
Chris@13
|
914 )
|
Chris@13
|
915 byRef: false
|
Chris@13
|
916 )
|
Chris@0
|
917 )
|
Chris@13
|
918 returnType: null
|
Chris@13
|
919 stmts: array(
|
Chris@13
|
920 )
|
Chris@0
|
921 )
|
Chris@0
|
922 )
|
Chris@0
|
923 )
|
Chris@0
|
924 -----
|
Chris@0
|
925 <?php
|
Chris@0
|
926
|
Chris@0
|
927 foo(Bar::);
|
Chris@0
|
928 -----
|
Chris@0
|
929 !!php7,positions
|
Chris@0
|
930 Syntax error, unexpected ')' from 3:10 to 3:10
|
Chris@0
|
931 array(
|
Chris@13
|
932 0: Stmt_Expression[3:1 - 3:11](
|
Chris@13
|
933 expr: Expr_FuncCall[3:1 - 3:10](
|
Chris@13
|
934 name: Name[3:1 - 3:3](
|
Chris@13
|
935 parts: array(
|
Chris@13
|
936 0: foo
|
Chris@13
|
937 )
|
Chris@0
|
938 )
|
Chris@13
|
939 args: array(
|
Chris@13
|
940 0: Arg[3:5 - 3:9](
|
Chris@13
|
941 value: Expr_ClassConstFetch[3:5 - 3:9](
|
Chris@13
|
942 class: Name[3:5 - 3:7](
|
Chris@13
|
943 parts: array(
|
Chris@13
|
944 0: Bar
|
Chris@13
|
945 )
|
Chris@13
|
946 )
|
Chris@13
|
947 name: Expr_Error[3:10 - 3:9](
|
Chris@0
|
948 )
|
Chris@0
|
949 )
|
Chris@13
|
950 byRef: false
|
Chris@13
|
951 unpack: false
|
Chris@0
|
952 )
|
Chris@0
|
953 )
|
Chris@0
|
954 )
|
Chris@0
|
955 )
|
Chris@16
|
956 )
|
Chris@16
|
957 -----
|
Chris@16
|
958 <?php
|
Chris@16
|
959
|
Chris@16
|
960 class Foo {
|
Chris@16
|
961 publi $foo;
|
Chris@16
|
962 public $bar;
|
Chris@16
|
963 }
|
Chris@16
|
964 -----
|
Chris@16
|
965 !!php7
|
Chris@16
|
966 Syntax error, unexpected T_STRING from 4:5 to 4:9
|
Chris@16
|
967 array(
|
Chris@16
|
968 0: Stmt_Class(
|
Chris@16
|
969 flags: 0
|
Chris@16
|
970 name: Identifier(
|
Chris@16
|
971 name: Foo
|
Chris@16
|
972 )
|
Chris@16
|
973 extends: null
|
Chris@16
|
974 implements: array(
|
Chris@16
|
975 )
|
Chris@16
|
976 stmts: array(
|
Chris@16
|
977 0: Stmt_Property(
|
Chris@16
|
978 flags: MODIFIER_PUBLIC (1)
|
Chris@17
|
979 type: null
|
Chris@16
|
980 props: array(
|
Chris@16
|
981 0: Stmt_PropertyProperty(
|
Chris@16
|
982 name: VarLikeIdentifier(
|
Chris@16
|
983 name: bar
|
Chris@16
|
984 )
|
Chris@16
|
985 default: null
|
Chris@16
|
986 )
|
Chris@16
|
987 )
|
Chris@16
|
988 )
|
Chris@16
|
989 )
|
Chris@16
|
990 )
|
Chris@16
|
991 )
|
Chris@16
|
992 -----
|
Chris@16
|
993 <?php
|
Chris@16
|
994
|
Chris@16
|
995 foreach ($foo) { $bar; }
|
Chris@16
|
996 foreach ($foo as ) { $bar; }
|
Chris@16
|
997 -----
|
Chris@16
|
998 !!php7
|
Chris@16
|
999 Syntax error, unexpected ')' from 3:14 to 3:14
|
Chris@16
|
1000 Syntax error, unexpected ')' from 4:18 to 4:18
|
Chris@16
|
1001 array(
|
Chris@16
|
1002 0: Stmt_Foreach(
|
Chris@16
|
1003 expr: Expr_Variable(
|
Chris@16
|
1004 name: foo
|
Chris@16
|
1005 )
|
Chris@16
|
1006 keyVar: null
|
Chris@16
|
1007 byRef: false
|
Chris@16
|
1008 valueVar: Expr_Error(
|
Chris@16
|
1009 )
|
Chris@16
|
1010 stmts: array(
|
Chris@16
|
1011 0: Stmt_Expression(
|
Chris@16
|
1012 expr: Expr_Variable(
|
Chris@16
|
1013 name: bar
|
Chris@16
|
1014 )
|
Chris@16
|
1015 )
|
Chris@16
|
1016 )
|
Chris@16
|
1017 )
|
Chris@16
|
1018 1: Stmt_Foreach(
|
Chris@16
|
1019 expr: Expr_Variable(
|
Chris@16
|
1020 name: foo
|
Chris@16
|
1021 )
|
Chris@16
|
1022 keyVar: null
|
Chris@16
|
1023 byRef: false
|
Chris@16
|
1024 valueVar: Expr_Error(
|
Chris@16
|
1025 )
|
Chris@16
|
1026 stmts: array(
|
Chris@16
|
1027 0: Stmt_Expression(
|
Chris@16
|
1028 expr: Expr_Variable(
|
Chris@16
|
1029 name: bar
|
Chris@16
|
1030 )
|
Chris@16
|
1031 )
|
Chris@16
|
1032 )
|
Chris@16
|
1033 )
|
Chris@16
|
1034 )
|
Chris@16
|
1035 -----
|
Chris@16
|
1036 <?php
|
Chris@16
|
1037
|
Chris@16
|
1038 function foo(Type) {
|
Chris@16
|
1039 $foo;
|
Chris@16
|
1040 }
|
Chris@16
|
1041
|
Chris@16
|
1042 function foo(Type1 $foo, Type2) {
|
Chris@16
|
1043 $bar;
|
Chris@16
|
1044 }
|
Chris@16
|
1045
|
Chris@16
|
1046 function foo(...) {
|
Chris@16
|
1047 $baz;
|
Chris@16
|
1048 }
|
Chris@16
|
1049
|
Chris@16
|
1050 function foo(&) {
|
Chris@16
|
1051 $qux;
|
Chris@16
|
1052 }
|
Chris@16
|
1053
|
Chris@16
|
1054 function foo(Bar)
|
Chris@16
|
1055
|
Chris@16
|
1056 class Bar {
|
Chris@16
|
1057 function foo(Baz)
|
Chris@16
|
1058 }
|
Chris@16
|
1059
|
Chris@16
|
1060 function(Foo);
|
Chris@16
|
1061 -----
|
Chris@16
|
1062 !!php7
|
Chris@16
|
1063 Syntax error, unexpected ')', expecting T_VARIABLE from 3:18 to 3:18
|
Chris@16
|
1064 Syntax error, unexpected ')', expecting T_VARIABLE from 7:31 to 7:31
|
Chris@16
|
1065 Syntax error, unexpected ')', expecting T_VARIABLE from 11:17 to 11:17
|
Chris@16
|
1066 Syntax error, unexpected ')', expecting T_VARIABLE from 15:15 to 15:15
|
Chris@16
|
1067 Syntax error, unexpected ')', expecting T_VARIABLE from 19:17 to 19:17
|
Chris@16
|
1068 Syntax error, unexpected ')', expecting T_VARIABLE from 22:21 to 22:21
|
Chris@16
|
1069 Syntax error, unexpected ')', expecting T_VARIABLE from 25:13 to 25:13
|
Chris@16
|
1070 array(
|
Chris@16
|
1071 0: Stmt_Function(
|
Chris@16
|
1072 byRef: false
|
Chris@16
|
1073 name: Identifier(
|
Chris@16
|
1074 name: foo
|
Chris@16
|
1075 )
|
Chris@16
|
1076 params: array(
|
Chris@16
|
1077 0: Param(
|
Chris@16
|
1078 type: Name(
|
Chris@16
|
1079 parts: array(
|
Chris@16
|
1080 0: Type
|
Chris@16
|
1081 )
|
Chris@16
|
1082 )
|
Chris@16
|
1083 byRef: false
|
Chris@16
|
1084 variadic: false
|
Chris@16
|
1085 var: Expr_Error(
|
Chris@16
|
1086 )
|
Chris@16
|
1087 default: null
|
Chris@16
|
1088 )
|
Chris@16
|
1089 )
|
Chris@16
|
1090 returnType: null
|
Chris@16
|
1091 stmts: array(
|
Chris@16
|
1092 0: Stmt_Expression(
|
Chris@16
|
1093 expr: Expr_Variable(
|
Chris@16
|
1094 name: foo
|
Chris@16
|
1095 )
|
Chris@16
|
1096 )
|
Chris@16
|
1097 )
|
Chris@16
|
1098 )
|
Chris@16
|
1099 1: Stmt_Function(
|
Chris@16
|
1100 byRef: false
|
Chris@16
|
1101 name: Identifier(
|
Chris@16
|
1102 name: foo
|
Chris@16
|
1103 )
|
Chris@16
|
1104 params: array(
|
Chris@16
|
1105 0: Param(
|
Chris@16
|
1106 type: Name(
|
Chris@16
|
1107 parts: array(
|
Chris@16
|
1108 0: Type1
|
Chris@16
|
1109 )
|
Chris@16
|
1110 )
|
Chris@16
|
1111 byRef: false
|
Chris@16
|
1112 variadic: false
|
Chris@16
|
1113 var: Expr_Variable(
|
Chris@16
|
1114 name: foo
|
Chris@16
|
1115 )
|
Chris@16
|
1116 default: null
|
Chris@16
|
1117 )
|
Chris@16
|
1118 1: Param(
|
Chris@16
|
1119 type: Name(
|
Chris@16
|
1120 parts: array(
|
Chris@16
|
1121 0: Type2
|
Chris@16
|
1122 )
|
Chris@16
|
1123 )
|
Chris@16
|
1124 byRef: false
|
Chris@16
|
1125 variadic: false
|
Chris@16
|
1126 var: Expr_Error(
|
Chris@16
|
1127 )
|
Chris@16
|
1128 default: null
|
Chris@16
|
1129 )
|
Chris@16
|
1130 )
|
Chris@16
|
1131 returnType: null
|
Chris@16
|
1132 stmts: array(
|
Chris@16
|
1133 0: Stmt_Expression(
|
Chris@16
|
1134 expr: Expr_Variable(
|
Chris@16
|
1135 name: bar
|
Chris@16
|
1136 )
|
Chris@16
|
1137 )
|
Chris@16
|
1138 )
|
Chris@16
|
1139 )
|
Chris@16
|
1140 2: Stmt_Function(
|
Chris@16
|
1141 byRef: false
|
Chris@16
|
1142 name: Identifier(
|
Chris@16
|
1143 name: foo
|
Chris@16
|
1144 )
|
Chris@16
|
1145 params: array(
|
Chris@16
|
1146 0: Param(
|
Chris@16
|
1147 type: null
|
Chris@16
|
1148 byRef: false
|
Chris@16
|
1149 variadic: true
|
Chris@16
|
1150 var: Expr_Error(
|
Chris@16
|
1151 )
|
Chris@16
|
1152 default: null
|
Chris@16
|
1153 )
|
Chris@16
|
1154 )
|
Chris@16
|
1155 returnType: null
|
Chris@16
|
1156 stmts: array(
|
Chris@16
|
1157 0: Stmt_Expression(
|
Chris@16
|
1158 expr: Expr_Variable(
|
Chris@16
|
1159 name: baz
|
Chris@16
|
1160 )
|
Chris@16
|
1161 )
|
Chris@16
|
1162 )
|
Chris@16
|
1163 )
|
Chris@16
|
1164 3: Stmt_Function(
|
Chris@16
|
1165 byRef: false
|
Chris@16
|
1166 name: Identifier(
|
Chris@16
|
1167 name: foo
|
Chris@16
|
1168 )
|
Chris@16
|
1169 params: array(
|
Chris@16
|
1170 0: Param(
|
Chris@16
|
1171 type: null
|
Chris@16
|
1172 byRef: true
|
Chris@16
|
1173 variadic: false
|
Chris@16
|
1174 var: Expr_Error(
|
Chris@16
|
1175 )
|
Chris@16
|
1176 default: null
|
Chris@16
|
1177 )
|
Chris@16
|
1178 )
|
Chris@16
|
1179 returnType: null
|
Chris@16
|
1180 stmts: array(
|
Chris@16
|
1181 0: Stmt_Expression(
|
Chris@16
|
1182 expr: Expr_Variable(
|
Chris@16
|
1183 name: qux
|
Chris@16
|
1184 )
|
Chris@16
|
1185 )
|
Chris@16
|
1186 )
|
Chris@16
|
1187 )
|
Chris@16
|
1188 4: Stmt_Function(
|
Chris@16
|
1189 byRef: false
|
Chris@16
|
1190 name: Identifier(
|
Chris@16
|
1191 name: foo
|
Chris@16
|
1192 )
|
Chris@16
|
1193 params: array(
|
Chris@16
|
1194 0: Param(
|
Chris@16
|
1195 type: Name(
|
Chris@16
|
1196 parts: array(
|
Chris@16
|
1197 0: Bar
|
Chris@16
|
1198 )
|
Chris@16
|
1199 )
|
Chris@16
|
1200 byRef: false
|
Chris@16
|
1201 variadic: false
|
Chris@16
|
1202 var: Expr_Error(
|
Chris@16
|
1203 )
|
Chris@16
|
1204 default: null
|
Chris@16
|
1205 )
|
Chris@16
|
1206 )
|
Chris@16
|
1207 returnType: null
|
Chris@16
|
1208 stmts: array(
|
Chris@16
|
1209 )
|
Chris@16
|
1210 )
|
Chris@16
|
1211 5: Stmt_Class(
|
Chris@16
|
1212 flags: 0
|
Chris@16
|
1213 name: Identifier(
|
Chris@16
|
1214 name: Bar
|
Chris@16
|
1215 )
|
Chris@16
|
1216 extends: null
|
Chris@16
|
1217 implements: array(
|
Chris@16
|
1218 )
|
Chris@16
|
1219 stmts: array(
|
Chris@16
|
1220 0: Stmt_ClassMethod(
|
Chris@16
|
1221 flags: 0
|
Chris@16
|
1222 byRef: false
|
Chris@16
|
1223 name: Identifier(
|
Chris@16
|
1224 name: foo
|
Chris@16
|
1225 )
|
Chris@16
|
1226 params: array(
|
Chris@16
|
1227 0: Param(
|
Chris@16
|
1228 type: Name(
|
Chris@16
|
1229 parts: array(
|
Chris@16
|
1230 0: Baz
|
Chris@16
|
1231 )
|
Chris@16
|
1232 )
|
Chris@16
|
1233 byRef: false
|
Chris@16
|
1234 variadic: false
|
Chris@16
|
1235 var: Expr_Error(
|
Chris@16
|
1236 )
|
Chris@16
|
1237 default: null
|
Chris@16
|
1238 )
|
Chris@16
|
1239 )
|
Chris@16
|
1240 returnType: null
|
Chris@16
|
1241 stmts: array(
|
Chris@16
|
1242 )
|
Chris@16
|
1243 )
|
Chris@16
|
1244 )
|
Chris@16
|
1245 )
|
Chris@16
|
1246 6: Stmt_Expression(
|
Chris@16
|
1247 expr: Expr_Closure(
|
Chris@16
|
1248 static: false
|
Chris@16
|
1249 byRef: false
|
Chris@16
|
1250 params: array(
|
Chris@16
|
1251 0: Param(
|
Chris@16
|
1252 type: Name(
|
Chris@16
|
1253 parts: array(
|
Chris@16
|
1254 0: Foo
|
Chris@16
|
1255 )
|
Chris@16
|
1256 )
|
Chris@16
|
1257 byRef: false
|
Chris@16
|
1258 variadic: false
|
Chris@16
|
1259 var: Expr_Error(
|
Chris@16
|
1260 )
|
Chris@16
|
1261 default: null
|
Chris@16
|
1262 )
|
Chris@16
|
1263 )
|
Chris@16
|
1264 uses: array(
|
Chris@16
|
1265 )
|
Chris@16
|
1266 returnType: null
|
Chris@16
|
1267 stmts: array(
|
Chris@16
|
1268 )
|
Chris@16
|
1269 )
|
Chris@16
|
1270 )
|
Chris@17
|
1271 )
|
Chris@17
|
1272 -----
|
Chris@17
|
1273 <?php
|
Chris@17
|
1274 $array = [
|
Chris@17
|
1275 $this->value $oopsAnotherValue->get()
|
Chris@17
|
1276 ];
|
Chris@17
|
1277 $array = [
|
Chris@17
|
1278 $value $oopsAnotherValue
|
Chris@17
|
1279 ];
|
Chris@17
|
1280 $array = [
|
Chris@17
|
1281 'key' => $value $oopsAnotherValue
|
Chris@17
|
1282 ];
|
Chris@17
|
1283 -----
|
Chris@17
|
1284 !!php7
|
Chris@17
|
1285 Syntax error, unexpected T_VARIABLE, expecting ',' or ')' or ']' from 3:18 to 3:34
|
Chris@17
|
1286 Syntax error, unexpected T_VARIABLE, expecting ',' or ')' or ']' from 6:12 to 6:28
|
Chris@17
|
1287 Syntax error, unexpected T_VARIABLE, expecting ',' or ')' or ']' from 9:21 to 9:37
|
Chris@17
|
1288 array(
|
Chris@17
|
1289 0: Stmt_Expression(
|
Chris@17
|
1290 expr: Expr_Assign(
|
Chris@17
|
1291 var: Expr_Variable(
|
Chris@17
|
1292 name: array
|
Chris@17
|
1293 )
|
Chris@17
|
1294 expr: Expr_Array(
|
Chris@17
|
1295 items: array(
|
Chris@17
|
1296 0: Expr_ArrayItem(
|
Chris@17
|
1297 key: null
|
Chris@17
|
1298 value: Expr_PropertyFetch(
|
Chris@17
|
1299 var: Expr_Variable(
|
Chris@17
|
1300 name: this
|
Chris@17
|
1301 )
|
Chris@17
|
1302 name: Identifier(
|
Chris@17
|
1303 name: value
|
Chris@17
|
1304 )
|
Chris@17
|
1305 )
|
Chris@17
|
1306 byRef: false
|
Chris@17
|
1307 )
|
Chris@17
|
1308 1: Expr_ArrayItem(
|
Chris@17
|
1309 key: null
|
Chris@17
|
1310 value: Expr_MethodCall(
|
Chris@17
|
1311 var: Expr_Variable(
|
Chris@17
|
1312 name: oopsAnotherValue
|
Chris@17
|
1313 )
|
Chris@17
|
1314 name: Identifier(
|
Chris@17
|
1315 name: get
|
Chris@17
|
1316 )
|
Chris@17
|
1317 args: array(
|
Chris@17
|
1318 )
|
Chris@17
|
1319 )
|
Chris@17
|
1320 byRef: false
|
Chris@17
|
1321 )
|
Chris@17
|
1322 )
|
Chris@17
|
1323 )
|
Chris@17
|
1324 )
|
Chris@17
|
1325 )
|
Chris@17
|
1326 1: Stmt_Expression(
|
Chris@17
|
1327 expr: Expr_Assign(
|
Chris@17
|
1328 var: Expr_Variable(
|
Chris@17
|
1329 name: array
|
Chris@17
|
1330 )
|
Chris@17
|
1331 expr: Expr_Array(
|
Chris@17
|
1332 items: array(
|
Chris@17
|
1333 0: Expr_ArrayItem(
|
Chris@17
|
1334 key: null
|
Chris@17
|
1335 value: Expr_Variable(
|
Chris@17
|
1336 name: value
|
Chris@17
|
1337 )
|
Chris@17
|
1338 byRef: false
|
Chris@17
|
1339 )
|
Chris@17
|
1340 1: Expr_ArrayItem(
|
Chris@17
|
1341 key: null
|
Chris@17
|
1342 value: Expr_Variable(
|
Chris@17
|
1343 name: oopsAnotherValue
|
Chris@17
|
1344 )
|
Chris@17
|
1345 byRef: false
|
Chris@17
|
1346 )
|
Chris@17
|
1347 )
|
Chris@17
|
1348 )
|
Chris@17
|
1349 )
|
Chris@17
|
1350 )
|
Chris@17
|
1351 2: Stmt_Expression(
|
Chris@17
|
1352 expr: Expr_Assign(
|
Chris@17
|
1353 var: Expr_Variable(
|
Chris@17
|
1354 name: array
|
Chris@17
|
1355 )
|
Chris@17
|
1356 expr: Expr_Array(
|
Chris@17
|
1357 items: array(
|
Chris@17
|
1358 0: Expr_ArrayItem(
|
Chris@17
|
1359 key: Scalar_String(
|
Chris@17
|
1360 value: key
|
Chris@17
|
1361 )
|
Chris@17
|
1362 value: Expr_Variable(
|
Chris@17
|
1363 name: value
|
Chris@17
|
1364 )
|
Chris@17
|
1365 byRef: false
|
Chris@17
|
1366 )
|
Chris@17
|
1367 1: Expr_ArrayItem(
|
Chris@17
|
1368 key: null
|
Chris@17
|
1369 value: Expr_Variable(
|
Chris@17
|
1370 name: oopsAnotherValue
|
Chris@17
|
1371 )
|
Chris@17
|
1372 byRef: false
|
Chris@17
|
1373 )
|
Chris@17
|
1374 )
|
Chris@17
|
1375 )
|
Chris@17
|
1376 )
|
Chris@17
|
1377 )
|
Chris@17
|
1378 )
|
Chris@17
|
1379 -----
|
Chris@17
|
1380 <?php
|
Chris@17
|
1381 function foo() :
|
Chris@17
|
1382 {
|
Chris@17
|
1383 return $a;
|
Chris@17
|
1384 }
|
Chris@17
|
1385 -----
|
Chris@17
|
1386 !!php7
|
Chris@17
|
1387 Syntax error, unexpected '{' from 3:1 to 3:1
|
Chris@17
|
1388 array(
|
Chris@17
|
1389 0: Stmt_Function(
|
Chris@17
|
1390 byRef: false
|
Chris@17
|
1391 name: Identifier(
|
Chris@17
|
1392 name: foo
|
Chris@17
|
1393 )
|
Chris@17
|
1394 params: array(
|
Chris@17
|
1395 )
|
Chris@17
|
1396 returnType: null
|
Chris@17
|
1397 stmts: array(
|
Chris@17
|
1398 0: Stmt_Return(
|
Chris@17
|
1399 expr: Expr_Variable(
|
Chris@17
|
1400 name: a
|
Chris@17
|
1401 )
|
Chris@17
|
1402 )
|
Chris@17
|
1403 )
|
Chris@17
|
1404 )
|
Chris@17
|
1405 )
|
Chris@17
|
1406 -----
|
Chris@17
|
1407 <?php
|
Chris@17
|
1408 $a = ["a "thing"];
|
Chris@17
|
1409 -----
|
Chris@17
|
1410 !!php7
|
Chris@17
|
1411 Syntax error, unexpected T_STRING, expecting ',' or ')' or ']' from 2:11 to 2:15 |