ns_035.phpt 389 B

123456789101112131415161718192021222324
  1. --TEST--
  2. 035: Name ambiguity in compile-time constant reference (php name)
  3. --FILE--
  4. <?php
  5. namespace A;
  6. use \ArrayObject;
  7. function f1($x = ArrayObject::STD_PROP_LIST) {
  8. var_dump($x);
  9. }
  10. function f2($x = \ArrayObject::STD_PROP_LIST) {
  11. var_dump($x);
  12. }
  13. var_dump(ArrayObject::STD_PROP_LIST);
  14. var_dump(\ArrayObject::STD_PROP_LIST);
  15. f1();
  16. f2();
  17. ?>
  18. --EXPECT--
  19. int(1)
  20. int(1)
  21. int(1)
  22. int(1)