php-src/Zend/tests/ns_086.phpt

38 lines
569 B
Plaintext
Raw Normal View History

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";
}
?>
2008-12-05 04:12:30 +08:00
--EXPECT--
foo::__construct
foo\bar::__construct
foo\bar::__construct
foo::__construct
===DONE===