1Test formatting attributes
2-----
3<?php
4
50b1100;
60o14;
712;
80xc;
91_2_3_4_5_6;
103.141_592_653;
11
12'foo';
13"bar";
14"foo
15bar";
16"foo\nbar";
17"foo\nbar{$x}";
18`foo\nbar`;
19`foo\nbar{$x}`;
20
21<<<'ABC'
22ABC;
23<<<'ABC'
24foo bar
25ABC;
26<<<'ABC'
27    foo bar
28    ABC;
29<<<ABC
30foo\nbar
31ABC;
32<<<ABC
33    foo\nbar
34    ABC;
35<<<ABC
36foo\nbar{$x}baz
37ABC;
38<<<ABC
39    foo\nbar{$x}baz
40    ABC;
41
42array();
43[];
44list($x) = $y;
45[$x] = $y;
46-----
47!!attributes
48array(
49    0: Stmt_Expression(
50        expr: Scalar_Int(
51            value: 12
52            rawValue: 0b1100
53            kind: KIND_BIN (2)
54        )
55    )
56    1: Stmt_Expression(
57        expr: Scalar_Int(
58            value: 12
59            rawValue: 0o14
60            kind: KIND_OCT (8)
61        )
62    )
63    2: Stmt_Expression(
64        expr: Scalar_Int(
65            value: 12
66            rawValue: 12
67            kind: KIND_DEC (10)
68        )
69    )
70    3: Stmt_Expression(
71        expr: Scalar_Int(
72            value: 12
73            rawValue: 0xc
74            kind: KIND_HEX (16)
75        )
76    )
77    4: Stmt_Expression(
78        expr: Scalar_Int(
79            value: 123456
80            rawValue: 1_2_3_4_5_6
81            kind: KIND_DEC (10)
82        )
83    )
84    5: Stmt_Expression(
85        expr: Scalar_Float(
86            value: 3.141592653
87            rawValue: 3.141_592_653
88        )
89    )
90    6: Stmt_Expression(
91        expr: Scalar_String(
92            value: foo
93            kind: KIND_SINGLE_QUOTED (1)
94            rawValue: 'foo'
95        )
96    )
97    7: Stmt_Expression(
98        expr: Scalar_String(
99            value: bar
100            kind: KIND_DOUBLE_QUOTED (2)
101            rawValue: "bar"
102        )
103    )
104    8: Stmt_Expression(
105        expr: Scalar_String(
106            value: foo
107            bar
108            kind: KIND_DOUBLE_QUOTED (2)
109            rawValue: "foo
110            bar"
111        )
112    )
113    9: Stmt_Expression(
114        expr: Scalar_String(
115            value: foo
116            bar
117            kind: KIND_DOUBLE_QUOTED (2)
118            rawValue: "foo\nbar"
119        )
120    )
121    10: Stmt_Expression(
122        expr: Scalar_InterpolatedString(
123            parts: array(
124                0: InterpolatedStringPart(
125                    value: foo
126                    bar
127                    rawValue: foo\nbar
128                )
129                1: Expr_Variable(
130                    name: x
131                )
132            )
133            kind: KIND_DOUBLE_QUOTED (2)
134        )
135    )
136    11: Stmt_Expression(
137        expr: Expr_ShellExec(
138            parts: array(
139                0: InterpolatedStringPart(
140                    value: foo
141                    bar
142                    rawValue: foo\nbar
143                )
144            )
145        )
146    )
147    12: Stmt_Expression(
148        expr: Expr_ShellExec(
149            parts: array(
150                0: InterpolatedStringPart(
151                    value: foo
152                    bar
153                    rawValue: foo\nbar
154                )
155                1: Expr_Variable(
156                    name: x
157                )
158            )
159        )
160    )
161    13: Stmt_Expression(
162        expr: Scalar_String(
163            value:
164            kind: KIND_NOWDOC (4)
165            docLabel: ABC
166            docIndentation:
167            rawValue:
168        )
169    )
170    14: Stmt_Expression(
171        expr: Scalar_String(
172            value: foo bar
173            kind: KIND_NOWDOC (4)
174            docLabel: ABC
175            docIndentation:
176            rawValue: foo bar
177        )
178    )
179    15: Stmt_Expression(
180        expr: Scalar_String(
181            value: foo bar
182            kind: KIND_NOWDOC (4)
183            docLabel: ABC
184            docIndentation:
185            rawValue: foo bar
186        )
187    )
188    16: Stmt_Expression(
189        expr: Scalar_String(
190            value: foo
191            bar
192            kind: KIND_HEREDOC (3)
193            docLabel: ABC
194            docIndentation:
195            rawValue: foo\nbar
196        )
197    )
198    17: Stmt_Expression(
199        expr: Scalar_String(
200            value: foo
201            bar
202            kind: KIND_HEREDOC (3)
203            docLabel: ABC
204            docIndentation:
205            rawValue: foo\nbar
206        )
207    )
208    18: Stmt_Expression(
209        expr: Scalar_InterpolatedString(
210            parts: array(
211                0: InterpolatedStringPart(
212                    value: foo
213                    bar
214                    rawValue: foo\nbar
215                )
216                1: Expr_Variable(
217                    name: x
218                )
219                2: InterpolatedStringPart(
220                    value: baz
221                    rawValue: baz
222                )
223            )
224            kind: KIND_HEREDOC (3)
225            docLabel: ABC
226            docIndentation:
227        )
228    )
229    19: Stmt_Expression(
230        expr: Scalar_InterpolatedString(
231            parts: array(
232                0: InterpolatedStringPart(
233                    value: foo
234                    bar
235                    rawValue: foo\nbar
236                )
237                1: Expr_Variable(
238                    name: x
239                )
240                2: InterpolatedStringPart(
241                    value: baz
242                    rawValue: baz
243                )
244            )
245            kind: KIND_HEREDOC (3)
246            docLabel: ABC
247            docIndentation:
248        )
249    )
250    20: Stmt_Expression(
251        expr: Expr_Array(
252            items: array(
253            )
254            kind: KIND_LONG (1)
255        )
256    )
257    21: Stmt_Expression(
258        expr: Expr_Array(
259            items: array(
260            )
261            kind: KIND_SHORT (2)
262        )
263    )
264    22: Stmt_Expression(
265        expr: Expr_Assign(
266            var: Expr_List(
267                items: array(
268                    0: ArrayItem(
269                        key: null
270                        value: Expr_Variable(
271                            name: x
272                        )
273                        byRef: false
274                        unpack: false
275                    )
276                )
277                kind: KIND_LIST (1)
278            )
279            expr: Expr_Variable(
280                name: y
281            )
282        )
283    )
284    23: Stmt_Expression(
285        expr: Expr_Assign(
286            var: Expr_List(
287                items: array(
288                    0: ArrayItem(
289                        key: null
290                        value: Expr_Variable(
291                            name: x
292                        )
293                        byRef: false
294                        unpack: false
295                    )
296                )
297                kind: KIND_ARRAY (2)
298            )
299            expr: Expr_Variable(
300                name: y
301            )
302        )
303    )
304)
305