summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_021.phpt
blob: 405468399fb956eba6f53727f0f95e8eff9fd2b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
021: Name search priority (first look into namespace)
--FILE--
<?php
namespace test;

class Test {
	static function foo() {
		echo __CLASS__,"::",__FUNCTION__,"\n";
	}
}

function foo() {
	echo __FUNCTION__,"\n";
}

foo();
\test\foo();
\test\test::foo();
--EXPECT--
test\foo
test\foo
test\Test::foo