mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-11 00:29:37 +01:00
a6846e3b71
The parser will now always generate Identifier nodes (for non-namespaced identifiers). This obsoletes the useIdentifierNodes parser option. Node constructors still accepts strings and will implicitly create an Identifier wrapper. Identifier implement __toString(), so that outside of strict-mode many things continue to work without changes.
48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
Global constants
|
|
-----
|
|
<?php
|
|
|
|
const A = 0, B = 1.0, C = 'A', D = E;
|
|
-----
|
|
array(
|
|
0: Stmt_Const(
|
|
consts: array(
|
|
0: Const(
|
|
name: Identifier(
|
|
name: A
|
|
)
|
|
value: Scalar_LNumber(
|
|
value: 0
|
|
)
|
|
)
|
|
1: Const(
|
|
name: Identifier(
|
|
name: B
|
|
)
|
|
value: Scalar_DNumber(
|
|
value: 1
|
|
)
|
|
)
|
|
2: Const(
|
|
name: Identifier(
|
|
name: C
|
|
)
|
|
value: Scalar_String(
|
|
value: A
|
|
)
|
|
)
|
|
3: Const(
|
|
name: Identifier(
|
|
name: D
|
|
)
|
|
value: Expr_ConstFetch(
|
|
name: Name(
|
|
parts: array(
|
|
0: E
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
) |