mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
22 lines
342 B
PHP
22 lines
342 B
PHP
--TEST--
|
|
031: Namespace support for user functions (ns name)
|
|
--FILE--
|
|
<?php
|
|
namespace test;
|
|
|
|
class Test {
|
|
static function foo() {
|
|
echo __CLASS__,"::",__FUNCTION__,"\n";
|
|
}
|
|
}
|
|
|
|
function foo() {
|
|
echo __FUNCTION__,"\n";
|
|
}
|
|
|
|
call_user_func(__NAMESPACE__."\\foo");
|
|
call_user_func(__NAMESPACE__."\\test::foo");
|
|
--EXPECT--
|
|
test\foo
|
|
test\Test::foo
|