protected function disableOpCache()
{
if (isset($_SERVER['SERVER_SOFTWARE']) && preg_match('/^PHP .*? Development Server$/', $_SERVER['SERVER_SOFTWARE'])) {
// skip the built-in PHP webserver (OPcache reset is not needed +
// it crashes the server in PHP 5.4 with ZendOptimizer+)
return;
}
// Disable opcode caches that allow runtime disabling
if (function_exists('xcache_get')) {
// XCache; just disable it
ini_set('xcache.cacher', '0');
return;
}
if (function_exists('wincache_ocache_meminfo')) {
// WinCache; just disable it
ini_set('wincache.ocenabled', '0');
return;
}
}