1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-11 08:59:46 +01:00
PHP-Parser/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test

71 lines
1.2 KiB
Plaintext
Raw Normal View History

2011-12-07 18:17:05 +01:00
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
)
)
)