function Runtime::performsJustInTimeCompilation
Returns true when Zend OPcache is loaded, enabled, and is configured to perform just-in-time compilation.
File
-
vendor/
sebastian/ environment/ src/ Runtime.php, line 66
Class
Namespace
SebastianBergmann\EnvironmentCode
public function performsJustInTimeCompilation() : bool {
if (PHP_MAJOR_VERSION < 8) {
return false;
}
if (!$this->isOpcacheActive()) {
return false;
}
if (ini_get('opcache.jit_buffer_size') === '0') {
return false;
}
$jit = ini_get('opcache.jit');
if ($jit === 'disable' || $jit === 'off') {
return false;
}
if (strrpos($jit, '0') === 3) {
return false;
}
return true;
}