xref: /PHP-8.1/Zend/tests/ns_021.phpt (revision 7aacc705)
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?>
21--EXPECT--
22test\foo
23test\foo
24test\Test::foo
25