On Mon, May 26, 2025 at 4:49 AM Tim Düsterhus <t...@bastelstu.be> wrote:
>
> Please find the RFC including more details at:
> https://wiki.php.net/rfc/make_opcache_required

Quoting from the RFC:

> OPcache being a non-optional part of PHP and always being loaded does not
> mean that OPcache functionality is always active. This RFC specifically
> does not propose the removal of the existing INI settings, such as
> opcache.enable or opcache.enable_cli.

To me, being able to turn off opcache defeats the purpose of putting it into
core. In fact, take this part of the RFC's introduction:

> As an example, OPcache needs to explicitly be compiled and loaded when
> using the PHP “Docker Official Image”, making it easy for users to
> accidentally run without OPcache when using Docker. Furthermore OPcache
> being optional and just “hooking” into the engine also means that there are
> two entirely separate code-paths for core PHP functionality (such as
> loading and compiling a PHP script), which can easily result in
> OPcache-specific bugs (such as #17422) that are hard to detect during
> testing.

If opcache can still be disabled, and isn't enabled by default in CLI, then
in practice we still have all of these issues. The engine may not have to
care about "is opcache around?" but it still has to care "is opcache
enabled?" Dropping the first part isn't that helpful if the second part still
has to be asked.

Reply via email to