function Runtime::isOpcacheActive
2 calls to Runtime::isOpcacheActive()
- Runtime::discardsComments in vendor/
sebastian/ environment/ src/ Runtime.php - Returns true when Zend OPcache is loaded, enabled, and is configured to discard comments.
- Runtime::performsJustInTimeCompilation in vendor/
sebastian/ environment/ src/ Runtime.php - 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 278
Class
Namespace
SebastianBergmann\EnvironmentCode
private function isOpcacheActive() : bool {
if (!extension_loaded('Zend OPcache')) {
return false;
}
if ((PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') && ini_get('opcache.enable_cli') === '1') {
return true;
}
if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' && ini_get('opcache.enable') === '1') {
return true;
}
return false;
}