php-src/Zend/tests/ns_022.phpt

20 lines
286 B
Plaintext
Raw Normal View History

2007-09-28 19:52:53 +00:00
--TEST--
022: Name search priority (first look into import, then into current namespace and then for class)
--FILE--
<?php
namespace a\b\c;
2007-09-28 19:52:53 +00:00
use a\b\c as test;
2007-09-28 19:52:53 +00:00
require "ns_022.inc";
function foo() {
echo __FUNCTION__,"\n";
}
test\foo();
\test::foo();
2007-09-28 19:52:53 +00:00
--EXPECT--
a\b\c\foo
2007-09-28 19:52:53 +00:00
Test::foo