bug77857.phpt 455 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #77857 (Wrong result if executed with JIT)
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.file_update_protection=0
  7. opcache.jit_buffer_size=64
  8. opcache.jit=1205
  9. --EXTENSIONS--
  10. opcache
  11. --FILE--
  12. <?php
  13. function test() {
  14. $arr = array_fill(0, 1, 1.0);
  15. $y = 0.0;
  16. foreach ($arr as $v) {
  17. $tmp = 1.0 * $v;
  18. var_dump($tmp);
  19. $y = $tmp/1.0;
  20. }
  21. return $y;
  22. }
  23. var_dump(test());
  24. ?>
  25. --EXPECT--
  26. float(1)
  27. float(1)