mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
The `jit_prof_threshold` is a float, supposed to be in range [0, 1], and usually very small (the default is 0.005). Reporting it as int is meaningless. Closes GH-17077.
20 lines
537 B
PHP
20 lines
537 B
PHP
--TEST--
|
|
opcache_get_configuration() properly reports jit_prof_threshold
|
|
--EXTENSIONS--
|
|
opcache
|
|
--SKIPIF--
|
|
<?php
|
|
if (!isset(opcache_get_configuration()["directives"]["opcache.jit_prof_threshold"])) die("skip no JIT");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$expected = 1 / 128; // needs to be exactly representable as IEEE double
|
|
ini_set("opcache.jit_prof_threshold", $expected);
|
|
$actual = opcache_get_configuration()["directives"]["opcache.jit_prof_threshold"];
|
|
var_dump($actual);
|
|
var_dump($actual === $expected);
|
|
?>
|
|
--EXPECTF--
|
|
float(0.0078125)
|
|
bool(true)
|