1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/opcache/tests/jit/loop_002.phpt
Daniil Gentili 2ca142ecd8 Improve jit tests
Closes GH-12425
2023-11-14 20:09:27 +01:00

27 lines
420 B
PHP

--TEST--
JIT HOT LOOP: 002
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=64M
opcache.jit=tracing
opcache.jit_hot_func=2
opcache.jit_hot_loop=2
opcache.jit_hot_side_exit=0
;opcache.jit_debug=257
--EXTENSIONS--
opcache
--FILE--
<?php
function foo($n) {
$res = 0;
for ($i = 1; $i < $n; $i++)
$res = $res + $i;
return $res;
}
print foo(5);
?>
--EXPECT--
10