2007-07-26 16:32:52 +08:00
|
|
|
--TEST--
|
|
|
|
028: Name ambiguity (class name & external namespace name)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
require "ns_028.inc";
|
|
|
|
|
|
|
|
class Foo {
|
|
|
|
function __construct() {
|
2020-02-04 05:52:20 +08:00
|
|
|
echo "Method - ".__CLASS__."::".__FUNCTION__."\n";
|
2007-07-26 16:32:52 +08:00
|
|
|
}
|
|
|
|
static function Bar() {
|
2020-02-04 05:52:20 +08:00
|
|
|
echo "Method - ".__CLASS__."::".__FUNCTION__."\n";
|
2007-07-26 16:32:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$x = new Foo;
|
2008-12-05 04:12:30 +08:00
|
|
|
Foo\Bar();
|
|
|
|
$x = new Foo\Foo;
|
|
|
|
Foo\Foo::Bar();
|
|
|
|
\Foo\Bar();
|
2020-08-09 17:06:57 +08:00
|
|
|
?>
|
2007-07-26 16:32:52 +08:00
|
|
|
--EXPECT--
|
|
|
|
Method - Foo::__construct
|
2008-12-05 04:12:30 +08:00
|
|
|
Func - Foo\Bar
|
|
|
|
Method - Foo\Foo::__construct
|
|
|
|
Method - Foo\Foo::Bar
|
|
|
|
Func - Foo\Bar
|