php-src/Zend/tests/ns_087.phpt
2008-12-04 20:12:30 +00:00

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