php-parser/test/code/parser/expr/fetchAndCall/constFetch.test

65 lines
1.2 KiB
Plaintext
Raw Normal View History

2011-12-07 18:17:05 +01:00
Constant fetches
-----
<?php
A;
A::B;
A::class;
2020-02-22 20:42:11 +01:00
$a::B;
$a::class;
2011-12-07 18:17:05 +01:00
-----
array(
2017-01-19 22:25:22 +01:00
0: Stmt_Expression(
expr: Expr_ConstFetch(
name: Name(
parts: array(
0: A
)
2011-12-07 18:17:05 +01:00
)
)
)
2017-01-19 22:25:22 +01:00
1: Stmt_Expression(
expr: Expr_ClassConstFetch(
class: Name(
parts: array(
0: A
)
2011-12-07 18:17:05 +01:00
)
name: Identifier(
name: B
)
2011-12-07 18:17:05 +01:00
)
)
2017-01-19 22:25:22 +01:00
2: Stmt_Expression(
expr: Expr_ClassConstFetch(
class: Name(
parts: array(
0: A
)
)
name: Identifier(
name: class
)
)
)
2020-02-22 20:42:11 +01:00
3: Stmt_Expression(
expr: Expr_ClassConstFetch(
class: Expr_Variable(
name: a
)
name: Identifier(
name: B
)
)
)
4: Stmt_Expression(
expr: Expr_ClassConstFetch(
class: Expr_Variable(
name: a
)
name: Identifier(
name: class
)
)
)
2011-12-07 18:17:05 +01:00
)