ns_042.phpt 252 B

12345678910111213141516171819202122
  1. --TEST--
  2. 042: Import in namespace and constants
  3. --FILE--
  4. <?php
  5. namespace test\ns1;
  6. const FOO = "ok\n";
  7. use test\ns1 as ns2;
  8. use test as ns3;
  9. echo FOO;
  10. echo \test\ns1\FOO;
  11. echo \test\ns1\FOO;
  12. echo ns2\FOO;
  13. echo ns3\ns1\FOO;
  14. --EXPECT--
  15. ok
  16. ok
  17. ok
  18. ok
  19. ok