2011-11-27 12:53:48 +01:00
|
|
|
Invalid namespace names
|
|
|
|
-----
|
|
|
|
<?php namespace self;
|
|
|
|
-----
|
2015-04-18 21:20:45 +02:00
|
|
|
Cannot use 'self' as namespace name from 1:17 to 1:20
|
2016-10-09 00:59:44 +02:00
|
|
|
array(
|
|
|
|
0: Stmt_Namespace(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: self
|
|
|
|
)
|
|
|
|
)
|
|
|
|
stmts: array(
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
2015-04-26 23:13:08 +02:00
|
|
|
<?php namespace PARENT;
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
2015-04-26 23:13:08 +02:00
|
|
|
Cannot use 'PARENT' as namespace name from 1:17 to 1:22
|
2016-10-09 00:59:44 +02:00
|
|
|
array(
|
|
|
|
0: Stmt_Namespace(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: PARENT
|
|
|
|
)
|
|
|
|
)
|
|
|
|
stmts: array(
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
|
|
|
<?php namespace static;
|
|
|
|
-----
|
2015-04-18 21:20:45 +02:00
|
|
|
Syntax error, unexpected T_STATIC, expecting T_STRING or T_NS_SEPARATOR or '{' from 1:17 to 1:22
|
2015-04-30 17:37:19 +02:00
|
|
|
array(
|
|
|
|
)
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
|
|
|
<?php use A as self;
|
|
|
|
-----
|
2016-10-09 00:59:44 +02:00
|
|
|
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: self
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
2015-04-26 23:13:08 +02:00
|
|
|
<?php use B as PARENT;
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
2016-10-09 00:59:44 +02:00
|
|
|
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: PARENT
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
|
|
|
<?php use C as static;
|
|
|
|
-----
|
2015-04-18 21:20:45 +02:00
|
|
|
Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21
|
2015-04-30 17:37:19 +02:00
|
|
|
array(
|
|
|
|
)
|