You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ php test.php -dopcache.jit_buffer_size=0 -dopcache.enable=1 -dopcache.enable_cli=0
// - First execution: 42
// - Second execution: 42
// - Third execution: 42
$ php test.php -dopcache.jit_buffer_size=0 -dopcache.enable=1 -dopcache.enable_cli=1
// - First execution: 42
// - Second execution: Enum case value must be compile-time evaluatable
// - Third execution: Enum case value must be compile-time evaluatable
But I expected this output instead:
// - First execution: 42
// - Second execution: 42
// - Third execution: 42
Conclusion
Behavior is affected by enabling or disabling opcache.
The jit buffer is disabled, which disables JIT compilation and therefore the problem occurs at an earlier "compilation stage".
Environment
Linux (Debian-based)
PHP 8.1.4 (cli) (built: Apr 4 2022 13:30:33) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.4, Copyright (c) Zend Technologies
with Zend OPcache v8.1.4, Copyright (c), by Zend Technologies
Description
The following code:
Resulted in this output:
But I expected this output instead:
Conclusion
Environment
Linux (Debian-based)
PHP 8.1.4 (cli) (built: Apr 4 2022 13:30:33) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.4, Copyright (c) Zend Technologies with Zend OPcache v8.1.4, Copyright (c), by Zend TechnologiesOther Info
PHP Version
8.1.4
Operating System
Ubuntu Budgie 21.10