Skip to content

Commit e5b4743

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: opcache_get_configuration() properly reports jit_prof_threshold
2 parents c0385e9 + 5eed224 commit e5b4743

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
opcache_get_configuration() properly reports jit_prof_threshold
3+
--EXTENSIONS--
4+
opcache
5+
--SKIPIF--
6+
<?php
7+
if (!isset(opcache_get_configuration()["directives"]["opcache.jit_prof_threshold"])) die("skip no JIT");
8+
?>
9+
--FILE--
10+
<?php
11+
$expected = 1 / 128; // needs to be exactly representable as IEEE double
12+
ini_set("opcache.jit_prof_threshold", $expected);
13+
$actual = opcache_get_configuration()["directives"]["opcache.jit_prof_threshold"];
14+
var_dump($actual);
15+
var_dump($actual === $expected);
16+
?>
17+
--EXPECTF--
18+
float(0.0078125)
19+
bool(true)

ext/opcache/zend_accelerator_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ ZEND_FUNCTION(opcache_get_configuration)
848848
add_assoc_long(&directives, "opcache.jit_max_recursive_returns", JIT_G(max_recursive_returns));
849849
add_assoc_long(&directives, "opcache.jit_max_root_traces", JIT_G(max_root_traces));
850850
add_assoc_long(&directives, "opcache.jit_max_side_traces", JIT_G(max_side_traces));
851-
add_assoc_long(&directives, "opcache.jit_prof_threshold", JIT_G(prof_threshold));
851+
add_assoc_double(&directives, "opcache.jit_prof_threshold", JIT_G(prof_threshold));
852852
add_assoc_long(&directives, "opcache.jit_max_trace_length", JIT_G(max_trace_length));
853853
#endif
854854

0 commit comments

Comments
 (0)