mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
7aacc705d0
Closes GH-5958
26 lines
360 B
PHP
26 lines
360 B
PHP
--TEST--
|
|
025: Name ambiguity (class name & part of namespace name)
|
|
--FILE--
|
|
<?php
|
|
namespace Foo\Bar;
|
|
|
|
class Foo {
|
|
function __construct() {
|
|
echo __CLASS__,"\n";
|
|
}
|
|
static function Bar() {
|
|
echo __CLASS__,"\n";
|
|
}
|
|
}
|
|
|
|
$x = new Foo;
|
|
Foo::Bar();
|
|
$x = new \Foo\Bar\Foo;
|
|
\Foo\Bar\Foo::Bar();
|
|
?>
|
|
--EXPECT--
|
|
Foo\Bar\Foo
|
|
Foo\Bar\Foo
|
|
Foo\Bar\Foo
|
|
Foo\Bar\Foo
|