summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_021.phpt
blob: 35374881492e4f7c2bd2d5c4ad21e408955090b8 (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
--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