作者 大饼博士

php5.* opcache加载判断

@@ -70,7 +70,7 @@ class Api extends Command @@ -70,7 +70,7 @@ class Api extends Command
70 } 70 }
71 71
72 if (version_compare(PHP_VERSION, '7.0.0', '<')) { 72 if (version_compare(PHP_VERSION, '7.0.0', '<')) {
73 - if (extension_loaded('opcache')) { 73 + if (extension_loaded('Zend OPcache')) {
74 $configuration = opcache_get_configuration(); 74 $configuration = opcache_get_configuration();
75 $directives = $configuration['directives']; 75 $directives = $configuration['directives'];
76 $configName = request()->isCli() ? 'opcache.enable_cli' : 'opcache.enable'; 76 $configName = request()->isCli() ? 'opcache.enable_cli' : 'opcache.enable';