1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-06 05:48:54 +01:00
PHP-Parser/test/code/parser/expr/fetchAndCall/constFetch.test
2020-02-22 20:42:11 +01:00

65 lines
1.2 KiB
Plaintext

Constant fetches
-----
<?php
A;
A::B;
A::class;
$a::B;
$a::class;
-----
array(
0: Stmt_Expression(
expr: Expr_ConstFetch(
name: Name(
parts: array(
0: A
)
)
)
)
1: Stmt_Expression(
expr: Expr_ClassConstFetch(
class: Name(
parts: array(
0: A
)
)
name: Identifier(
name: B
)
)
)
2: Stmt_Expression(
expr: Expr_ClassConstFetch(
class: Name(
parts: array(
0: A
)
)
name: Identifier(
name: class
)
)
)
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
)
)
)
)