mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-13 17:47:23 +01:00
0cee2088ea
This no longer applies as of PHP 8.0.
51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
Invalid namespace names
|
|
-----
|
|
<?php use A as self;
|
|
-----
|
|
Cannot use A as self because 'self' is a special class name from 1:16 to 1:19
|
|
array(
|
|
0: Stmt_Use(
|
|
type: TYPE_NORMAL (1)
|
|
uses: array(
|
|
0: Stmt_UseUse(
|
|
type: TYPE_UNKNOWN (0)
|
|
name: Name(
|
|
parts: array(
|
|
0: A
|
|
)
|
|
)
|
|
alias: Identifier(
|
|
name: self
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
-----
|
|
<?php use B as PARENT;
|
|
-----
|
|
Cannot use B as PARENT because 'PARENT' is a special class name from 1:16 to 1:21
|
|
array(
|
|
0: Stmt_Use(
|
|
type: TYPE_NORMAL (1)
|
|
uses: array(
|
|
0: Stmt_UseUse(
|
|
type: TYPE_UNKNOWN (0)
|
|
name: Name(
|
|
parts: array(
|
|
0: B
|
|
)
|
|
)
|
|
alias: Identifier(
|
|
name: PARENT
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
-----
|
|
<?php use C as static;
|
|
-----
|
|
Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21
|
|
array(
|
|
) |