1Attributes
2-----
3<?php
4
5#[
6    A1,
7    A2(),
8    A3(0),
9    A4(x: 1),
10]
11function a() {
12}
13
14#[A5]
15class C {
16    #[A6]
17    public function m(
18        #[A7] $param,
19    ) {}
20    #[A14]
21    public $prop;
22}
23
24#[A8]
25interface I {}
26#[A9]
27trait T {}
28
29$x = #[A10] function() {};
30$y = #[A11] fn() => 0;
31$a = #[A12] static function() {};
32$b = #[A13] static fn() => 0;
33-----
34array(
35    0: Stmt_Function(
36        attrGroups: array(
37            0: AttributeGroup(
38                attrs: array(
39                    0: Attribute(
40                        name: Name(
41                            name: A1
42                        )
43                        args: array(
44                        )
45                    )
46                    1: Attribute(
47                        name: Name(
48                            name: A2
49                        )
50                        args: array(
51                        )
52                    )
53                    2: Attribute(
54                        name: Name(
55                            name: A3
56                        )
57                        args: array(
58                            0: Arg(
59                                name: null
60                                value: Scalar_Int(
61                                    value: 0
62                                )
63                                byRef: false
64                                unpack: false
65                            )
66                        )
67                    )
68                    3: Attribute(
69                        name: Name(
70                            name: A4
71                        )
72                        args: array(
73                            0: Arg(
74                                name: Identifier(
75                                    name: x
76                                )
77                                value: Scalar_Int(
78                                    value: 1
79                                )
80                                byRef: false
81                                unpack: false
82                            )
83                        )
84                    )
85                )
86            )
87        )
88        byRef: false
89        name: Identifier(
90            name: a
91        )
92        params: array(
93        )
94        returnType: null
95        stmts: array(
96        )
97    )
98    1: Stmt_Class(
99        attrGroups: array(
100            0: AttributeGroup(
101                attrs: array(
102                    0: Attribute(
103                        name: Name(
104                            name: A5
105                        )
106                        args: array(
107                        )
108                    )
109                )
110            )
111        )
112        flags: 0
113        name: Identifier(
114            name: C
115        )
116        extends: null
117        implements: array(
118        )
119        stmts: array(
120            0: Stmt_ClassMethod(
121                attrGroups: array(
122                    0: AttributeGroup(
123                        attrs: array(
124                            0: Attribute(
125                                name: Name(
126                                    name: A6
127                                )
128                                args: array(
129                                )
130                            )
131                        )
132                    )
133                )
134                flags: PUBLIC (1)
135                byRef: false
136                name: Identifier(
137                    name: m
138                )
139                params: array(
140                    0: Param(
141                        attrGroups: array(
142                            0: AttributeGroup(
143                                attrs: array(
144                                    0: Attribute(
145                                        name: Name(
146                                            name: A7
147                                        )
148                                        args: array(
149                                        )
150                                    )
151                                )
152                            )
153                        )
154                        flags: 0
155                        type: null
156                        byRef: false
157                        variadic: false
158                        var: Expr_Variable(
159                            name: param
160                        )
161                        default: null
162                        hooks: array(
163                        )
164                    )
165                )
166                returnType: null
167                stmts: array(
168                )
169            )
170            1: Stmt_Property(
171                attrGroups: array(
172                    0: AttributeGroup(
173                        attrs: array(
174                            0: Attribute(
175                                name: Name(
176                                    name: A14
177                                )
178                                args: array(
179                                )
180                            )
181                        )
182                    )
183                )
184                flags: PUBLIC (1)
185                type: null
186                props: array(
187                    0: PropertyItem(
188                        name: VarLikeIdentifier(
189                            name: prop
190                        )
191                        default: null
192                    )
193                )
194                hooks: array(
195                )
196            )
197        )
198    )
199    2: Stmt_Interface(
200        attrGroups: array(
201            0: AttributeGroup(
202                attrs: array(
203                    0: Attribute(
204                        name: Name(
205                            name: A8
206                        )
207                        args: array(
208                        )
209                    )
210                )
211            )
212        )
213        name: Identifier(
214            name: I
215        )
216        extends: array(
217        )
218        stmts: array(
219        )
220    )
221    3: Stmt_Trait(
222        attrGroups: array(
223            0: AttributeGroup(
224                attrs: array(
225                    0: Attribute(
226                        name: Name(
227                            name: A9
228                        )
229                        args: array(
230                        )
231                    )
232                )
233            )
234        )
235        name: Identifier(
236            name: T
237        )
238        stmts: array(
239        )
240    )
241    4: Stmt_Expression(
242        expr: Expr_Assign(
243            var: Expr_Variable(
244                name: x
245            )
246            expr: Expr_Closure(
247                attrGroups: array(
248                    0: AttributeGroup(
249                        attrs: array(
250                            0: Attribute(
251                                name: Name(
252                                    name: A10
253                                )
254                                args: array(
255                                )
256                            )
257                        )
258                    )
259                )
260                static: false
261                byRef: false
262                params: array(
263                )
264                uses: array(
265                )
266                returnType: null
267                stmts: array(
268                )
269            )
270        )
271    )
272    5: Stmt_Expression(
273        expr: Expr_Assign(
274            var: Expr_Variable(
275                name: y
276            )
277            expr: Expr_ArrowFunction(
278                attrGroups: array(
279                    0: AttributeGroup(
280                        attrs: array(
281                            0: Attribute(
282                                name: Name(
283                                    name: A11
284                                )
285                                args: array(
286                                )
287                            )
288                        )
289                    )
290                )
291                static: false
292                byRef: false
293                params: array(
294                )
295                returnType: null
296                expr: Scalar_Int(
297                    value: 0
298                )
299            )
300        )
301    )
302    6: Stmt_Expression(
303        expr: Expr_Assign(
304            var: Expr_Variable(
305                name: a
306            )
307            expr: Expr_Closure(
308                attrGroups: array(
309                    0: AttributeGroup(
310                        attrs: array(
311                            0: Attribute(
312                                name: Name(
313                                    name: A12
314                                )
315                                args: array(
316                                )
317                            )
318                        )
319                    )
320                )
321                static: true
322                byRef: false
323                params: array(
324                )
325                uses: array(
326                )
327                returnType: null
328                stmts: array(
329                )
330            )
331        )
332    )
333    7: Stmt_Expression(
334        expr: Expr_Assign(
335            var: Expr_Variable(
336                name: b
337            )
338            expr: Expr_ArrowFunction(
339                attrGroups: array(
340                    0: AttributeGroup(
341                        attrs: array(
342                            0: Attribute(
343                                name: Name(
344                                    name: A13
345                                )
346                                args: array(
347                                )
348                            )
349                        )
350                    )
351                )
352                static: true
353                byRef: false
354                params: array(
355                )
356                returnType: null
357                expr: Scalar_Int(
358                    value: 0
359                )
360            )
361        )
362    )
363)
364