2008-04-09 16:55:45 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #44653 (Invalid namespace name resolution)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
namespace A;
|
|
|
|
const XX=1;
|
|
|
|
function fooBar() { echo __FUNCTION__ . PHP_EOL; }
|
|
|
|
|
|
|
|
namespace B;
|
|
|
|
class A {
|
|
|
|
static function fooBar() { echo "bag1\n"; }
|
|
|
|
}
|
|
|
|
class B {
|
|
|
|
static function fooBar() { echo "bag2\n"; }
|
|
|
|
}
|
|
|
|
function fooBar() { echo __FUNCTION__ . PHP_EOL; }
|
2008-11-04 23:58:55 +08:00
|
|
|
var_dump(\A\XX);
|
2008-04-09 16:55:45 +08:00
|
|
|
A::fooBar();
|
2008-11-04 23:58:55 +08:00
|
|
|
\A\fooBar();
|
2008-04-09 16:55:45 +08:00
|
|
|
B::fooBar();
|
2008-11-04 23:58:55 +08:00
|
|
|
fooBar();
|
|
|
|
\B\fooBar();
|
2008-04-09 16:55:45 +08:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
int(1)
|
2008-11-04 23:58:55 +08:00
|
|
|
bag1
|
|
|
|
A\fooBar
|
|
|
|
bag2
|
|
|
|
B\fooBar
|
|
|
|
B\fooBar
|