symfony/polyfill-apcu
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
Symfony/polyfill-apcu is a valuable toolset in the Symfony ecosystem, designed primarily to provide apcu_*
functions and the APCuIterator
class for end users who work with the legacy APC extension. This essentially allows for the backporting of these functionalities to PHP versions that would not otherwise support them, thereby enabling broader compatibility and the utilization of APCu features across a range of PHP environments.
Using symfony/polyfill-apcu is fairly straightforward. As a part of the larger Symfony Polyfill components, it can be integrated into your PHP project using Composer. Firstly, you will need to have Composer installed. Then, navigate to your project directory in your terminal, and run the command:
composer require symfony/polyfill-apcu
Doing so will install the polyfill and enable its use in your application. You can now use the APCu functions as if your PHP version natively supports them. A usage example might look like this:
$data = array('key' => 'value');
apcu_store($data);
if (apcu_exists('key')) {
$value = apcu_fetch('key');
echo $value; // prints 'value'
}
The APCu functions are now ready to be used in lower PHP versions.
In terms of locating comprehensive documentation for the symfony/polyfill-apcu, it's included in the main polyfill documentation which is found in the primary README file for the Symfony Polyfill suite. The information for symfony/polyfill-apcu, along with all the other polyfills, can be found at the main Polyfill README. This documentation provides an expansive overview of its features, usage, and integration with Symfony and PHP overall.