constants_003.phpt 273 B

123456789101112131415161718192021
  1. --TEST--
  2. Using namespace constants and constants of global scope
  3. --FILE--
  4. <?php
  5. namespace foo;
  6. const foo = 1;
  7. define('foo', 2);
  8. var_dump(foo, namespace\foo, \foo\foo, \foo, constant('foo'), constant('foo\foo'));
  9. ?>
  10. --EXPECT--
  11. int(1)
  12. int(1)
  13. int(1)
  14. int(2)
  15. int(2)
  16. int(1)