mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-27 17:30:29 +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.
33 lines
535 B
Plaintext
33 lines
535 B
Plaintext
Error positions
|
|
-----
|
|
<?php foo
|
|
-----
|
|
Syntax error, unexpected EOF from 1:10 to 1:10
|
|
array(
|
|
0: Stmt_Expression(
|
|
expr: Expr_ConstFetch(
|
|
name: Name(
|
|
name: foo
|
|
)
|
|
)
|
|
)
|
|
)
|
|
-----
|
|
<?php foo /* bar */
|
|
-----
|
|
Syntax error, unexpected EOF from 1:20 to 1:20
|
|
array(
|
|
0: Stmt_Expression(
|
|
expr: Expr_ConstFetch(
|
|
name: Name(
|
|
name: foo
|
|
)
|
|
)
|
|
)
|
|
1: Stmt_Nop(
|
|
comments: array(
|
|
0: /* bar */
|
|
)
|
|
)
|
|
)
|