1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-13 18:07:32 +01:00
PHP-Parser/test/code/parser/expr/uvs/staticProperty.test

123 lines
2.7 KiB
Plaintext
Raw Normal View History

2015-06-13 15:42:09 +02:00
UVS static access
-----
<?php
A::$b;
$A::$b;
'A'::$b;
('A' . '')::$b;
'A'[0]::$b;
A::$$b;
A::$$c[1];
A::$A::$b;
-----
!!php7
array(
2017-01-19 22:25:22 +01:00
0: Stmt_Expression(
expr: Expr_StaticPropertyFetch(
class: Name(
parts: array(
0: A
)
2015-06-13 15:42:09 +02:00
)
name: VarLikeIdentifier(
name: b
)
2015-06-13 15:42:09 +02:00
)
)
2017-01-19 22:25:22 +01:00
1: Stmt_Expression(
expr: Expr_StaticPropertyFetch(
class: Expr_Variable(
name: A
)
name: VarLikeIdentifier(
name: b
)
2015-06-13 15:42:09 +02:00
)
)
2017-01-19 22:25:22 +01:00
2: Stmt_Expression(
expr: Expr_StaticPropertyFetch(
class: Scalar_String(
2015-06-13 15:42:09 +02:00
value: A
)
name: VarLikeIdentifier(
name: b
)
2015-06-13 15:42:09 +02:00
)
)
2017-01-19 22:25:22 +01:00
3: Stmt_Expression(
expr: Expr_StaticPropertyFetch(
class: Expr_BinaryOp_Concat(
left: Scalar_String(
value: A
)
right: Scalar_String(
value:
)
2015-06-13 15:42:09 +02:00
)
name: VarLikeIdentifier(
name: b
)
2015-06-13 15:42:09 +02:00
)
)
2017-01-19 22:25:22 +01:00
4: Stmt_Expression(
expr: Expr_StaticPropertyFetch(
class: Expr_ArrayDimFetch(
var: Scalar_String(
value: A
)
dim: Scalar_LNumber(
value: 0
)
2015-06-13 15:42:09 +02:00
)
name: VarLikeIdentifier(
name: b
)
2015-06-13 15:42:09 +02:00
)
)
2017-01-19 22:25:22 +01:00
5: Stmt_Expression(
expr: Expr_StaticPropertyFetch(
2015-06-13 15:42:09 +02:00
class: Name(
parts: array(
0: A
)
)
name: Expr_Variable(
2017-01-19 22:25:22 +01:00
name: b
2015-06-13 15:42:09 +02:00
)
)
2017-01-19 22:25:22 +01:00
)
6: Stmt_Expression(
expr: Expr_ArrayDimFetch(
var: Expr_StaticPropertyFetch(
class: Name(
parts: array(
0: A
)
)
name: Expr_Variable(
name: c
)
)
dim: Scalar_LNumber(
value: 1
)
2015-06-13 15:42:09 +02:00
)
)
2017-01-19 22:25:22 +01:00
7: Stmt_Expression(
expr: Expr_StaticPropertyFetch(
class: Expr_StaticPropertyFetch(
class: Name(
parts: array(
0: A
)
2015-06-13 15:42:09 +02:00
)
name: VarLikeIdentifier(
name: A
)
)
name: VarLikeIdentifier(
name: b
2015-06-13 15:42:09 +02:00
)
)
)
2017-01-19 22:25:22 +01:00
)