略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: opcache_get_status

2025-02-27

opcache_get_status

(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL ZendOpcache > 7.0.2)

opcache_get_status获取缓存的状态信息

说明

opcache_get_status(bool $include_scripts = true): array|false

该函数将返回内存中缓存实例的状态信息。不会返回有关文件缓存的任何信息。

参数

include_scripts

包含脚本的具体声明信息。

返回值

返回可能包含脚本特定状态信息的数组, 或者在失败时返回 false

错误/异常

在启用了 opcache.restrict_api 的情况下,如果当前路径在禁止规则里,将会出现 E_WARNING ;不会返回任何状态信息。

参见

添加备注

用户贡献的备注 1 note

up
1
pascal dot landau at googlemail dot com
8 years ago
If the opcache is disabled, this functions returns false.

官方地址:https://www.php.net/manual/en/function.opcache-get-status.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3