bug66176.phpt 333 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #66176 (Invalid constant substitution)
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=-1
  7. opcache.file_update_protection=0
  8. --EXTENSIONS--
  9. opcache
  10. --FILE--
  11. <?php
  12. function foo($v) {
  13. global $a;
  14. return $a[$v];
  15. }
  16. $a = array(PHP_VERSION => 1);
  17. var_dump(foo(PHP_VERSION));
  18. ?>
  19. --EXPECT--
  20. int(1)