2011-11-27 12:53:48 +01:00
|
|
|
Namespace types cannot be mixed
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
namespace A;
|
2016-10-09 00:59:44 +02:00
|
|
|
echo 1;
|
|
|
|
namespace B {
|
|
|
|
echo 2;
|
|
|
|
}
|
|
|
|
echo 3;
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
2016-10-09 00:59:44 +02:00
|
|
|
Cannot mix bracketed namespace declarations with unbracketed namespace declarations on line 4
|
|
|
|
array(
|
|
|
|
0: Stmt_Namespace(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
stmts: array(
|
|
|
|
0: Stmt_Echo(
|
|
|
|
exprs: array(
|
|
|
|
0: Scalar_LNumber(
|
|
|
|
value: 1
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
1: Stmt_Namespace(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: B
|
|
|
|
)
|
|
|
|
)
|
|
|
|
stmts: array(
|
|
|
|
0: Stmt_Echo(
|
|
|
|
exprs: array(
|
|
|
|
0: Scalar_LNumber(
|
|
|
|
value: 2
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
2: Stmt_Echo(
|
|
|
|
exprs: array(
|
|
|
|
0: Scalar_LNumber(
|
|
|
|
value: 3
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
|
|
|
<?php
|
2016-10-09 00:59:44 +02:00
|
|
|
namespace A {
|
|
|
|
echo 1;
|
|
|
|
}
|
|
|
|
echo 2;
|
2011-11-27 12:53:48 +01:00
|
|
|
namespace B;
|
2016-10-09 00:59:44 +02:00
|
|
|
echo 3;
|
2011-11-27 12:53:48 +01:00
|
|
|
-----
|
2016-10-09 00:59:44 +02:00
|
|
|
Cannot mix bracketed namespace declarations with unbracketed namespace declarations on line 6
|
|
|
|
array(
|
|
|
|
0: Stmt_Namespace(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
stmts: array(
|
|
|
|
0: Stmt_Echo(
|
|
|
|
exprs: array(
|
|
|
|
0: Scalar_LNumber(
|
|
|
|
value: 1
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
1: Stmt_Echo(
|
|
|
|
exprs: array(
|
|
|
|
0: Scalar_LNumber(
|
|
|
|
value: 2
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
2: Stmt_Namespace(
|
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: B
|
|
|
|
)
|
|
|
|
)
|
|
|
|
stmts: array(
|
|
|
|
0: Stmt_Echo(
|
|
|
|
exprs: array(
|
|
|
|
0: Scalar_LNumber(
|
|
|
|
value: 3
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|