ns_022.phpt 286 B

12345678910111213141516171819
  1. --TEST--
  2. 022: Name search priority (first look into import, then into current namespace and then for class)
  3. --FILE--
  4. <?php
  5. namespace a\b\c;
  6. use a\b\c as test;
  7. require "ns_022.inc";
  8. function foo() {
  9. echo __FUNCTION__,"\n";
  10. }
  11. test\foo();
  12. \test::foo();
  13. --EXPECT--
  14. a\b\c\foo
  15. Test::foo