mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-25 00:01:45 +02:00
In most circumstances we are interested in the whole string, not the parts split by namespace separator. As names are common, this representation measurably improves memory usage and performance.
60 lines
1.0 KiB
Plaintext
60 lines
1.0 KiB
Plaintext
Constant fetches
|
|
-----
|
|
<?php
|
|
|
|
A;
|
|
A::B;
|
|
A::class;
|
|
$a::B;
|
|
$a::class;
|
|
-----
|
|
array(
|
|
0: Stmt_Expression(
|
|
expr: Expr_ConstFetch(
|
|
name: Name(
|
|
name: A
|
|
)
|
|
)
|
|
)
|
|
1: Stmt_Expression(
|
|
expr: Expr_ClassConstFetch(
|
|
class: Name(
|
|
name: A
|
|
)
|
|
name: Identifier(
|
|
name: B
|
|
)
|
|
)
|
|
)
|
|
2: Stmt_Expression(
|
|
expr: Expr_ClassConstFetch(
|
|
class: Name(
|
|
name: 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
|
|
)
|
|
)
|
|
)
|
|
)
|