1Dereferencing of constants
2-----
3<?php
4
5A->length;
6A->length();
7A[0];
8A[0][1][2];
9
10A::B[0];
11A::B[0][1][2];
12A::B->length;
13A::B->length();
14A::B::C;
15A::B::$c;
16A::B::c();
17
18__FUNCTION__[0];
19__FUNCTION__->length;
20__FUNCIONT__->length();
21-----
22array(
23    0: Stmt_Expression(
24        expr: Expr_PropertyFetch(
25            var: Expr_ConstFetch(
26                name: Name(
27                    name: A
28                )
29            )
30            name: Identifier(
31                name: length
32            )
33        )
34    )
35    1: Stmt_Expression(
36        expr: Expr_MethodCall(
37            var: Expr_ConstFetch(
38                name: Name(
39                    name: A
40                )
41            )
42            name: Identifier(
43                name: length
44            )
45            args: array(
46            )
47        )
48    )
49    2: Stmt_Expression(
50        expr: Expr_ArrayDimFetch(
51            var: Expr_ConstFetch(
52                name: Name(
53                    name: A
54                )
55            )
56            dim: Scalar_Int(
57                value: 0
58            )
59        )
60    )
61    3: Stmt_Expression(
62        expr: Expr_ArrayDimFetch(
63            var: Expr_ArrayDimFetch(
64                var: Expr_ArrayDimFetch(
65                    var: Expr_ConstFetch(
66                        name: Name(
67                            name: A
68                        )
69                    )
70                    dim: Scalar_Int(
71                        value: 0
72                    )
73                )
74                dim: Scalar_Int(
75                    value: 1
76                )
77            )
78            dim: Scalar_Int(
79                value: 2
80            )
81        )
82    )
83    4: Stmt_Expression(
84        expr: Expr_ArrayDimFetch(
85            var: Expr_ClassConstFetch(
86                class: Name(
87                    name: A
88                )
89                name: Identifier(
90                    name: B
91                )
92            )
93            dim: Scalar_Int(
94                value: 0
95            )
96        )
97    )
98    5: Stmt_Expression(
99        expr: Expr_ArrayDimFetch(
100            var: Expr_ArrayDimFetch(
101                var: Expr_ArrayDimFetch(
102                    var: Expr_ClassConstFetch(
103                        class: Name(
104                            name: A
105                        )
106                        name: Identifier(
107                            name: B
108                        )
109                    )
110                    dim: Scalar_Int(
111                        value: 0
112                    )
113                )
114                dim: Scalar_Int(
115                    value: 1
116                )
117            )
118            dim: Scalar_Int(
119                value: 2
120            )
121        )
122    )
123    6: Stmt_Expression(
124        expr: Expr_PropertyFetch(
125            var: Expr_ClassConstFetch(
126                class: Name(
127                    name: A
128                )
129                name: Identifier(
130                    name: B
131                )
132            )
133            name: Identifier(
134                name: length
135            )
136        )
137    )
138    7: Stmt_Expression(
139        expr: Expr_MethodCall(
140            var: Expr_ClassConstFetch(
141                class: Name(
142                    name: A
143                )
144                name: Identifier(
145                    name: B
146                )
147            )
148            name: Identifier(
149                name: length
150            )
151            args: array(
152            )
153        )
154    )
155    8: Stmt_Expression(
156        expr: Expr_ClassConstFetch(
157            class: Expr_ClassConstFetch(
158                class: Name(
159                    name: A
160                )
161                name: Identifier(
162                    name: B
163                )
164            )
165            name: Identifier(
166                name: C
167            )
168        )
169    )
170    9: Stmt_Expression(
171        expr: Expr_StaticPropertyFetch(
172            class: Expr_ClassConstFetch(
173                class: Name(
174                    name: A
175                )
176                name: Identifier(
177                    name: B
178                )
179            )
180            name: VarLikeIdentifier(
181                name: c
182            )
183        )
184    )
185    10: Stmt_Expression(
186        expr: Expr_StaticCall(
187            class: Expr_ClassConstFetch(
188                class: Name(
189                    name: A
190                )
191                name: Identifier(
192                    name: B
193                )
194            )
195            name: Identifier(
196                name: c
197            )
198            args: array(
199            )
200        )
201    )
202    11: Stmt_Expression(
203        expr: Expr_ArrayDimFetch(
204            var: Scalar_MagicConst_Function(
205            )
206            dim: Scalar_Int(
207                value: 0
208            )
209        )
210    )
211    12: Stmt_Expression(
212        expr: Expr_PropertyFetch(
213            var: Scalar_MagicConst_Function(
214            )
215            name: Identifier(
216                name: length
217            )
218        )
219    )
220    13: Stmt_Expression(
221        expr: Expr_MethodCall(
222            var: Expr_ConstFetch(
223                name: Name(
224                    name: __FUNCIONT__
225                )
226            )
227            name: Identifier(
228                name: length
229            )
230            args: array(
231            )
232        )
233    )
234)
235