PHP RFC: Change how JIT is disabled by default
- Date: 2023-11-15
- Author: Daniil Gentili firstname.lastname@example.org
- Status: Accepted
This RFC proposes to change how JIT is disabled by default.
Currently, JIT is disabled by default using the
opcache.jit_buffer_size=0 default, instead of
For example, here are the defaults for these two configuration entries:
This effectively disables JIT not because
jit=disable, but rather because the buffer size is set to 0.
This RFC proposes to change these defaults to:
The chosen JIT buffer size default is 64 mb, a reasonable default, given that any smaller multiple of 2 causes the buffer to fill up when running moderately sized projects like Psalm or PHPStan.
Another possible option for the default is 128 mb, which is incidentally also the maximum allowed JIT buffer size on the aarch64 architecture.
Backward Incompatible Changes
This RFC does not change the default behavior, JIT was and still is disabled by default, however now it is now disabled by default using the
opcache.jit setting, not the
This may affect users who enabled JIT by only setting a different
opcache.jit_buffer_size, without specifying a JIT mode with
To enable JIT, users will also be required to populate the
opcache.jit config value.
Proposed PHP Version(s)
Next PHP 8.4.
See Backwards Incompatible Changes section.
Proposed Voting Choices
2/3 required to accept. Voting started on 2023-12-03 and will end on 2023-12-18 00:00 GMT.
Patches and Tests
Pull request: https://github.com/php/php-src/pull/12678
Reference internals discussion: https://externals.io/message/121359