php-src/Zend/tests/ns_021.phpt

24 lines
308 B
Plaintext
Raw Normal View History

2007-07-12 17:23:48 +08:00
--TEST--
021: Name search priority (first look into namespace)
--FILE--
<?php
namespace test;
class Test {
static function foo() {
echo __CLASS__,"::",__FUNCTION__,"\n";
}
}
function foo() {
echo __FUNCTION__,"\n";
}
foo();
2008-12-05 04:12:30 +08:00
\test\foo();
\test\test::foo();
2007-07-12 17:23:48 +08:00
--EXPECT--
2008-12-05 04:12:30 +08:00
test\foo
test\foo
test\Test::foo