Hi internals and All OPcache Static Cache RFC discussion members. I've made significant changes to the API to bring it to a form that most people will find acceptable. Currently the implementation stub is here https://github.com/colopl/php-src/blob/982a5f4d6bffd033f9c5a02586327c86fcef1cda/ext/opcache/opcache.stub.php
And thank you Nicolas, Hi's more optimization and simplification bring better performance and simplism. This means you ever have to worry about how values are stored anymore. Serializer is completely gone. https://github.com/colopl/php-src/pull/4 I sent this email because I wanted to hear thoughts on whether I should decide to **remove the proposed implementation of Attribute based cache from this RFC.** Attribute-based caching is highly efficient and consistently delivers the best performance. But, it also requires the OPcache JIT to intervene. This requires a review by Derick, the developer of JIT, and must be handled with caution. Furthermore, the argument that FrankenPHP should be used if that level of performance is required certainly makes sense. Originally, I drafted this RFC with the goal of “improving performance as an extension of the existing PHP SAPI,” so this would deviate from my initial objective. However, now that I realize there is a demand for a “more faster integrated APCu,” I feel that this goal might need to be deprioritized. This RFC also sparked a discussion about how security boundaries should be handled. I’ve chosen to implement it in a way that SAPI isn’t enabled unless explicitly opted into Do you think this meets the requirements? (I’d especially like to ask Jakub about this.) To explain the process step by step, here is how I would like to proceed: 1. Narrow the scope of this RFC, reach consensus and hold a vote as soon as possible, and ensure it can be incorporated into 8.6. 2. Create a new RFC on Attribute-based Caching to initiate a new discussion (though this may not be ready in time for 8.6.) Please share your opinions. Best regards, Go Kudo 2026年5月17日(日) 0:19 Go Kudo <[email protected]>: > Hi internals, > > I'd like to start the discussion for a new RFC, OPcache Static Cache. > > RFC: https://wiki.php.net/rfc/opcache_static_cache > Implementation: https://github.com/php/php-src/pull/22052 > > The proposal adds an OPcache-managed shared-memory cache for explicit > userland values and for selected PHP static state. It introduces explicit > functions under the OPcache namespace (volatile_* and persistent_*) and two > attributes, #[OPcache\VolatileStatic] and #[OPcache\PersistentStatic], that > let selected static properties and method static variables survive across > requests. The feature is disabled by default and only activates once memory > is allocated through the new INI directives. > > The RFC covers the motivation, the deliberate split between the two > backends, the trust model (one PHP runtime = one trust domain; this is not > a tenant isolation boundary), and benchmarks against APCu on NTS php-fpm > and ZTS FrankenPHP. The PR is the full implementation, with PHPT coverage > summarized in the Validation section. > > One thing to flag on the implementation status: the Windows build is > currently broken. I don't have a Windows development environment available > yet — one is being arranged through work, and I'll get the Windows side > fixed once that's in place. > > Feedback welcome. > > Best Regards, > Go Kudo >
