2008-12-05 04:12:30 +08:00
|
|
|
--TEST--
|
|
|
|
086: bracketed namespace with encoding
|
2011-01-05 06:01:09 +08:00
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
|
|
|
if (!extension_loaded("mbstring")) {
|
|
|
|
die("skip Requires mbstring extension");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
--INI--
|
|
|
|
zend.multibyte=1
|
2008-12-05 04:12:30 +08:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
declare(encoding='utf-8');
|
|
|
|
namespace foo {
|
|
|
|
use \foo;
|
|
|
|
class bar {
|
2020-02-04 05:52:20 +08:00
|
|
|
function __construct() {echo __METHOD__,"\n";}
|
2008-12-05 04:12:30 +08:00
|
|
|
}
|
|
|
|
new foo;
|
|
|
|
new bar;
|
|
|
|
}
|
|
|
|
namespace {
|
|
|
|
class foo {
|
2020-02-04 05:52:20 +08:00
|
|
|
function __construct() {echo __METHOD__,"\n";}
|
2008-12-05 04:12:30 +08:00
|
|
|
}
|
|
|
|
use foo\bar as foo1;
|
|
|
|
new foo1;
|
|
|
|
new foo;
|
|
|
|
echo "===DONE===\n";
|
|
|
|
}
|
2020-08-09 17:06:57 +08:00
|
|
|
?>
|
2008-12-05 04:12:30 +08:00
|
|
|
--EXPECT--
|
|
|
|
foo::__construct
|
|
|
|
foo\bar::__construct
|
|
|
|
foo\bar::__construct
|
|
|
|
foo::__construct
|
2018-10-15 10:33:09 +08:00
|
|
|
===DONE===
|