mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
25 lines
413 B
PHP
25 lines
413 B
PHP
--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
|