mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-06-28 11:02:49 +02:00
44 lines
886 B
Plaintext
44 lines
886 B
Plaintext
Dynamic class constant fetch
|
|
-----
|
|
<?php
|
|
Foo::{bar()};
|
|
$foo::{bar()};
|
|
-----
|
|
!!php7
|
|
array(
|
|
0: Stmt_Expression(
|
|
expr: Expr_ClassConstFetch(
|
|
class: Name(
|
|
parts: array(
|
|
0: Foo
|
|
)
|
|
)
|
|
name: Expr_FuncCall(
|
|
name: Name(
|
|
parts: array(
|
|
0: bar
|
|
)
|
|
)
|
|
args: array(
|
|
)
|
|
)
|
|
)
|
|
)
|
|
1: Stmt_Expression(
|
|
expr: Expr_ClassConstFetch(
|
|
class: Expr_Variable(
|
|
name: foo
|
|
)
|
|
name: Expr_FuncCall(
|
|
name: Name(
|
|
parts: array(
|
|
0: bar
|
|
)
|
|
)
|
|
args: array(
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|