if(php_sapi_name() != 'cli') {
if(function_exists('opcache_reset')) {
opcache_reset();
}
}
本文探讨了一段PHP代码的功能,该代码在非CLI环境下运行时,会检查并重置OPCache,确保代码执行效率。深入解析了php_sapi_name()和opcache_reset()函数的使用场景。
if(php_sapi_name() != 'cli') {
if(function_exists('opcache_reset')) {
opcache_reset();
}
}

被折叠的 条评论
为什么被折叠?