mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-12-04 18:28:25 +01:00
71 lines
1.2 KiB
Plaintext
71 lines
1.2 KiB
Plaintext
|
Static property fetches
|
||
|
-----
|
||
|
<?php
|
||
|
|
||
|
// property name variations
|
||
|
A::$b;
|
||
|
A::$$b;
|
||
|
A::${'b'};
|
||
|
|
||
|
// array access
|
||
|
A::$b['c'];
|
||
|
A::$b{'c'};
|
||
|
|
||
|
// class name variations can be found in staticCall.test
|
||
|
-----
|
||
|
array(
|
||
|
0: Expr_StaticPropertyFetch(
|
||
|
class: Name(
|
||
|
parts: array(
|
||
|
0: A
|
||
|
)
|
||
|
)
|
||
|
name: b
|
||
|
)
|
||
|
1: Expr_StaticPropertyFetch(
|
||
|
class: Name(
|
||
|
parts: array(
|
||
|
0: A
|
||
|
)
|
||
|
)
|
||
|
name: Expr_Variable(
|
||
|
name: b
|
||
|
)
|
||
|
)
|
||
|
2: Expr_StaticPropertyFetch(
|
||
|
class: Name(
|
||
|
parts: array(
|
||
|
0: A
|
||
|
)
|
||
|
)
|
||
|
name: Scalar_String(
|
||
|
value: b
|
||
|
)
|
||
|
)
|
||
|
3: Expr_ArrayDimFetch(
|
||
|
var: Expr_StaticPropertyFetch(
|
||
|
class: Name(
|
||
|
parts: array(
|
||
|
0: A
|
||
|
)
|
||
|
)
|
||
|
name: b
|
||
|
)
|
||
|
dim: Scalar_String(
|
||
|
value: c
|
||
|
)
|
||
|
)
|
||
|
4: Expr_ArrayDimFetch(
|
||
|
var: Expr_StaticPropertyFetch(
|
||
|
class: Name(
|
||
|
parts: array(
|
||
|
0: A
|
||
|
)
|
||
|
)
|
||
|
name: b
|
||
|
)
|
||
|
dim: Scalar_String(
|
||
|
value: c
|
||
|
)
|
||
|
)
|
||
|
)
|