[php-src] Issue #14267: opcache.jit=off does not behave as documented

From: Date: Sun, 19 May 2024 17:33:18 +0000
Subject: [php-src] Issue #14267: opcache.jit=off does not behave as documented
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246929@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14267 Author: siliconforks ### Description According to the [documentation for opcache.jit](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.jit), the value disable means "Completely disabled, cannot be enabled at runtime", and the value off means "Disabled, but can be enabled at runtime". But if you put the following values in your php.ini: ``` zend_extension=opcache opcache.jit=off opcache.jit_buffer_size=64M ``` ...then you try to enable at runtime inside a .php file: ```php <?php ini_set('opcache.jit', 'tracing'); ``` ...then you will get this: ``` Warning: Cannot change opcache.jit setting at run-time (JIT is disabled) ``` This is the same result you get if you set opcache.jit=disable. As far as I can tell, the problem is that the code is looking for the literal string off but since that value is handled specially by PHP's ini parser, the code will never actually see a value of off. (It will never see no or false either.) https://github.com/php/php-src/blob/8830fbd9861f780ad365ffe5a18f73c40719757d/ext/opcache/jit/zend_jit.c#L4806-L4817 ### PHP Version PHP 8.3.7 ### Operating System _No response_

« previous php.bugs (#246929) next »