php-src/Zend/tests/ns_022.phpt
Dmitry Stogov 1f413bbc37 Namespaces
2007-07-12 09:23:48 +00:00

24 lines
373 B
PHP
Executable File

--TEST--
022: Name search priority (first look into import, then into current namespace and then for class)
--FILE--
<?php
namespace a::b::c;
import a::b::c as test;
class Test {
static function foo() {
echo __CLASS__,"::",__FUNCTION__,"\n";
}
}
function foo() {
echo __FUNCTION__,"\n";
}
test::foo();
test::test::foo();
--EXPECT--
a::b::c::foo
a::b::c::Test::foo