2007-09-28 19:52:53 +00:00
|
|
|
--TEST--
|
|
|
|
002: Import in namespace
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2008-11-04 15:58:55 +00:00
|
|
|
namespace test\ns1;
|
2007-09-28 19:52:53 +00:00
|
|
|
|
|
|
|
class Foo {
|
|
|
|
static function bar() {
|
|
|
|
echo __CLASS__,"\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-11-04 15:58:55 +00:00
|
|
|
use test\ns1\Foo as Bar;
|
|
|
|
use test\ns1 as ns2;
|
|
|
|
use test\ns1;
|
2007-09-28 19:52:53 +00:00
|
|
|
|
|
|
|
Foo::bar();
|
2008-11-11 19:45:29 +00:00
|
|
|
\test\ns1\Foo::bar();
|
2007-09-28 19:52:53 +00:00
|
|
|
Bar::bar();
|
2008-11-04 15:58:55 +00:00
|
|
|
ns2\Foo::bar();
|
|
|
|
ns1\Foo::bar();
|
2007-09-28 19:52:53 +00:00
|
|
|
--EXPECT--
|
2008-11-04 15:58:55 +00:00
|
|
|
test\ns1\Foo
|
|
|
|
test\ns1\Foo
|
|
|
|
test\ns1\Foo
|
|
|
|
test\ns1\Foo
|
|
|
|
test\ns1\Foo
|