mingalevme / opcache-status-info
PHP OPcache status information object
Installs: 715
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mingalevme/opcache-status-info
Requires
- php: >=7.4
Requires (Dev)
- phpstan/phpstan: ^0.12.92
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
- vimeo/psalm: ^4.8
This package is auto-updated.
Last update: 2025-09-29 02:51:48 UTC
README
The PHP opcache_get_status
-function result wrapper.
Installation
composer require mingalevme/opcache-status-info
Usage
# some bootstrap file use Mingalevme\OpcacheStatusInfo\Fetcher as OpcacheStatusInfoFetcher; use Mingalevme\OpcacheStatusInfo\Fetcher\OpcacheGetStatusFetcher; $fetcher = new OpcacheGetStatusFetcher(); $someDIContainer->bind(OpcacheStatusInfoFetcher::class, function() use ($fetcher): OpcacheStatusInfoFetcher { return $fetcher; });
# some app file use Mingalevme\OpcacheStatusInfo\Fetcher; use Mingalevme\OpcacheStatusInfo\OpcacheStatusScriptInfo; /** @var Fetcher $fetcher */ $fetcher = $someDIContainer->get(Fetcher::class); $opcacheStatusInfo = $fetcher->fetch(); echo $opcacheStatusInfo->isEnabled(); /** @var OpcacheStatusScriptInfo $opcacheStatusScriptInfo */ foreach ($opcacheStatusInfo->getScripts() as $opcacheStatusScriptInfo) { echo $opcacheStatusScriptInfo->getFullPath(); }