summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_087.phpt
blob: b2f0a89b22ed2a7b88048581e80961aa492539a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--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