xref: /PHP-7.2/Zend/tests/ns_021.phpt (revision 610c7fbe)
1--TEST--
2021: Name search priority (first look into namespace)
3--FILE--
4<?php
5namespace test;
6
7class Test {
8	static function foo() {
9		echo __CLASS__,"::",__FUNCTION__,"\n";
10	}
11}
12
13function foo() {
14	echo __FUNCTION__,"\n";
15}
16
17foo();
18\test\foo();
19\test\test::foo();
20--EXPECT--
21test\foo
22test\foo
23test\Test::foo
24