mirror of
https://github.com/php/php-src.git
synced 2024-12-03 14:54:40 +08:00
7aacc705d0
Closes GH-5958
25 lines
326 B
PHP
25 lines
326 B
PHP
--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();
|
|
\test\foo();
|
|
\test\test::foo();
|
|
?>
|
|
--EXPECT--
|
|
test\foo
|
|
test\foo
|
|
test\Test::foo
|