Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Runtime.php

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

Runtime

Namespace

SebastianBergmann\Environment

Code

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;
}
RSS feed
Powered by Drupal