summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_086.phpt
blob: ed4b8a238ceae53841cdd71ea1a5fcf3a5de8555 (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
25
26
27
28
29
30
31
32
33
34
35
36
--TEST--
086: bracketed namespace with encoding
--SKIPIF--
<?php
if (!extension_loaded("mbstring")) {
  die("skip Requires mbstring extension");
}
?>
--INI--
zend.multibyte=1
--FILE--
<?php
declare(encoding='utf-8');
namespace foo {
use \foo;
class bar {
	function __construct() {echo __METHOD__,"\n";}
}
new foo;
new bar;
}
namespace {
class foo {
	function __construct() {echo __METHOD__,"\n";}
}
use foo\bar as foo1;
new foo1;
new foo;
echo "===DONE===\n";
}
--EXPECT--
foo::__construct
foo\bar::__construct
foo\bar::__construct
foo::__construct
===DONE===