<?php
// Source: https://bugs.php.net/bug.php?id=70237
ini_set('opcache.enable_cli', true);
if ((int) ini_get('opcache.enable_cli') !== 1) {
throw new Exception('Opcode cache must be enabled on CLI environment');
}
function neverUsed() {
$bool = false;
while ($bool) { };
// Same with: do { } while ($bool);
}
echo "OK";
Fatal error: Uncaught Exception: Opcode cache must be enabled on CLI environment in /in/sJa3q:7
Stack trace:
#0 {main}
thrown in /in/sJa3q on line 7
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: Uncaught Exception: Opcode cache must be enabled on CLI environment in /in/sJa3q:7
Stack trace:
#0 {main}
thrown in /in/sJa3q on line 7
Process exited with code 255.
Output for 7.1.5 - 7.1.6
OK
Output for 5.5.0 - 5.5.35, 5.6.0 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'Opcode cache must be enabled on CLI environment' in /in/sJa3q:7
Stack trace:
#0 {main}
thrown in /in/sJa3q on line 7
Process exited with code 255.