1Lexer errors
2-----
3<?php
4
5$a = 42;
6/*
7$b = 24;
8-----
9Unterminated comment from 4:1 to 5:9
10array(
11    0: Stmt_Expression(
12        expr: Expr_Assign(
13            var: Expr_Variable(
14                name: a
15            )
16            expr: Scalar_Int(
17                value: 42
18            )
19        )
20    )
21    1: Stmt_Nop(
22        comments: array(
23            0: /*
24            $b = 24;
25        )
26    )
27)
28-----
29<?php
30
31$a = 42;
32@@{ "\1" }@@
33$b = 24;
34-----
35!!positions
36Unexpected character "" (ASCII 1) from 4:1 to 4:1
37array(
38    0: Stmt_Expression[3:1 - 3:8](
39        expr: Expr_Assign[3:1 - 3:7](
40            var: Expr_Variable[3:1 - 3:2](
41                name: a
42            )
43            expr: Scalar_Int[3:6 - 3:7](
44                value: 42
45            )
46        )
47    )
48    1: Stmt_Expression[5:1 - 5:8](
49        expr: Expr_Assign[5:1 - 5:7](
50            var: Expr_Variable[5:1 - 5:2](
51                name: b
52            )
53            expr: Scalar_Int[5:6 - 5:7](
54                value: 24
55            )
56        )
57    )
58)
59-----
60<?php
61
62$a = 42;
63@@{ "\0" }@@
64$b = 24;
65-----
66!!positions
67Unexpected null byte from 4:1 to 4:1
68array(
69    0: Stmt_Expression[3:1 - 3:8](
70        expr: Expr_Assign[3:1 - 3:7](
71            var: Expr_Variable[3:1 - 3:2](
72                name: a
73            )
74            expr: Scalar_Int[3:6 - 3:7](
75                value: 42
76            )
77        )
78    )
79    1: Stmt_Expression[5:1 - 5:8](
80        expr: Expr_Assign[5:1 - 5:7](
81            var: Expr_Variable[5:1 - 5:2](
82                name: b
83            )
84            expr: Scalar_Int[5:6 - 5:7](
85                value: 24
86            )
87        )
88    )
89)
90-----
91<?php
92
93$a = 1;
94@@{ "\1" }@@
95$b = 2;
96@@{ "\2" }@@
97$c = 3;
98-----
99!!positions
100Unexpected character "" (ASCII 1) from 4:1 to 4:1
101Unexpected character "" (ASCII 2) from 6:1 to 6:1
102array(
103    0: Stmt_Expression[3:1 - 3:7](
104        expr: Expr_Assign[3:1 - 3:6](
105            var: Expr_Variable[3:1 - 3:2](
106                name: a
107            )
108            expr: Scalar_Int[3:6 - 3:6](
109                value: 1
110            )
111        )
112    )
113    1: Stmt_Expression[5:1 - 5:7](
114        expr: Expr_Assign[5:1 - 5:6](
115            var: Expr_Variable[5:1 - 5:2](
116                name: b
117            )
118            expr: Scalar_Int[5:6 - 5:6](
119                value: 2
120            )
121        )
122    )
123    2: Stmt_Expression[7:1 - 7:7](
124        expr: Expr_Assign[7:1 - 7:6](
125            var: Expr_Variable[7:1 - 7:2](
126                name: c
127            )
128            expr: Scalar_Int[7:6 - 7:6](
129                value: 3
130            )
131        )
132    )
133)
134-----
135<?php
136
137if ($b) {
138    $a = 1;
139    /* unterminated
140}
141-----
142Unterminated comment from 5:5 to 6:2
143Syntax error, unexpected EOF from 6:2 to 6:2
144