2015-08-20 16:42:49 +02:00
|
|
|
Invalid group use syntax
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
// Missing semicolon
|
|
|
|
use Foo\{Bar}
|
|
|
|
use Bar\{Foo};
|
|
|
|
-----
|
2017-02-05 17:47:56 +01:00
|
|
|
!!php7
|
2015-08-20 16:42:49 +02:00
|
|
|
Syntax error, unexpected T_USE, expecting ';' from 4:1 to 4:3
|
|
|
|
array(
|
|
|
|
0: Stmt_GroupUse(
|
2017-02-05 17:47:56 +01:00
|
|
|
type: TYPE_UNKNOWN (0)
|
|
|
|
prefix: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Foo
|
|
|
|
)
|
|
|
|
)
|
|
|
|
uses: array(
|
|
|
|
0: Stmt_UseUse(
|
|
|
|
type: TYPE_NORMAL (1)
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Bar
|
|
|
|
)
|
|
|
|
)
|
2017-04-28 21:05:01 +02:00
|
|
|
alias: null
|
2017-02-05 17:47:56 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
comments: array(
|
|
|
|
0: // Missing semicolon
|
|
|
|
)
|
|
|
|
)
|
|
|
|
1: Stmt_GroupUse(
|
2016-07-25 14:04:04 +02:00
|
|
|
type: TYPE_UNKNOWN (0)
|
2015-08-20 16:42:49 +02:00
|
|
|
prefix: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Bar
|
|
|
|
)
|
|
|
|
)
|
|
|
|
uses: array(
|
|
|
|
0: Stmt_UseUse(
|
2016-07-25 14:04:04 +02:00
|
|
|
type: TYPE_NORMAL (1)
|
2015-08-20 16:42:49 +02:00
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Foo
|
|
|
|
)
|
|
|
|
)
|
2017-04-28 21:05:01 +02:00
|
|
|
alias: null
|
2015-08-20 16:42:49 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
// Missing NS separator
|
|
|
|
use Foo {Bar, Baz};
|
|
|
|
-----
|
2017-02-05 17:47:56 +01:00
|
|
|
!!php7
|
2017-02-09 00:35:12 +01:00
|
|
|
Syntax error, unexpected '{', expecting ';' from 3:9 to 3:9
|
2015-08-20 16:42:49 +02:00
|
|
|
array(
|
2017-02-05 17:47:56 +01:00
|
|
|
0: Stmt_Use(
|
|
|
|
type: TYPE_NORMAL (1)
|
|
|
|
uses: array(
|
|
|
|
0: Stmt_UseUse(
|
|
|
|
type: TYPE_UNKNOWN (0)
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Foo
|
|
|
|
)
|
|
|
|
)
|
2017-04-28 21:05:01 +02:00
|
|
|
alias: null
|
2017-02-05 17:47:56 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
comments: array(
|
|
|
|
0: // Missing NS separator
|
|
|
|
)
|
|
|
|
)
|
2017-02-05 17:50:54 +01:00
|
|
|
1: Stmt_Expression(
|
2017-01-19 22:25:22 +01:00
|
|
|
expr: Expr_ConstFetch(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Bar
|
|
|
|
)
|
2016-04-20 16:47:10 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-02-05 17:50:54 +01:00
|
|
|
2: Stmt_Expression(
|
2017-01-19 22:25:22 +01:00
|
|
|
expr: Expr_ConstFetch(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: Baz
|
|
|
|
)
|
2016-04-20 16:47:10 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2015-08-20 16:42:49 +02:00
|
|
|
)
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
// Extra NS separator
|
|
|
|
use Foo\{\Bar};
|
|
|
|
-----
|
2020-07-23 11:57:04 +02:00
|
|
|
Syntax error, unexpected T_NAME_FULLY_QUALIFIED, expecting T_STRING or T_FUNCTION or T_CONST or T_NAME_QUALIFIED from 3:10 to 3:13
|
2015-08-20 16:42:49 +02:00
|
|
|
array(
|
2017-01-19 22:25:22 +01:00
|
|
|
0: Stmt_Expression(
|
|
|
|
expr: Expr_ConstFetch(
|
|
|
|
name: Name_FullyQualified(
|
|
|
|
parts: array(
|
|
|
|
0: Bar
|
|
|
|
)
|
2016-04-20 16:47:10 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2015-08-20 16:42:49 +02:00
|
|
|
)
|