summaryrefslogtreecommitdiff
path: root/Zend/tests/bug44653.phpt
blob: 28e1d8ef7189f4a29ef64ec67616ddaed33fa40d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--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; }
var_dump(\A\XX);
A::fooBar();
\A\fooBar();
B::fooBar();
fooBar();
\B\fooBar();
?>
--EXPECT--
int(1)
bag1
A\fooBar
bag2
B\fooBar
B\fooBar