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