mirror of
https://github.com/php/php-src.git
synced 2024-09-24 19:37:26 +00:00
24 lines
373 B
PHP
Executable File
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
|