loop_002.phpt 420 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. JIT HOT LOOP: 002
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.file_update_protection=0
  7. opcache.jit_buffer_size=32M
  8. opcache.jit=tracing
  9. opcache.jit_hot_func=2
  10. opcache.jit_hot_loop=2
  11. opcache.jit_hot_side_exit=0
  12. ;opcache.jit_debug=257
  13. --EXTENSIONS--
  14. opcache
  15. --FILE--
  16. <?php
  17. function foo($n) {
  18. $res = 0;
  19. for ($i = 1; $i < $n; $i++)
  20. $res = $res + $i;
  21. return $res;
  22. }
  23. print foo(5);
  24. ?>
  25. --EXPECT--
  26. 10