mirror of
https://github.com/php/php-src.git
synced 2024-11-29 21:04:10 +08:00
25 lines
413 B
Plaintext
25 lines
413 B
Plaintext
|
--TEST--
|
||
|
087: bracketed namespace with stuff in between
|
||
|
--FILE--
|
||
|
<?php
|
||
|
namespace foo {
|
||
|
use \foo;
|
||
|
class bar {
|
||
|
function __construct() {echo __METHOD__,"\n";}
|
||
|
}
|
||
|
new foo;
|
||
|
new bar;
|
||
|
}
|
||
|
$a = 'oops';
|
||
|
namespace {
|
||
|
class foo {
|
||
|
function __construct() {echo __METHOD__,"\n";}
|
||
|
}
|
||
|
use foo\bar as foo1;
|
||
|
new foo1;
|
||
|
new foo;
|
||
|
echo "===DONE===\n";
|
||
|
}
|
||
|
--EXPECTF--
|
||
|
Fatal error: No code may exist outside of namespace {} in %s on line 10
|