ARTICLE AD BOX
We recently set up a new server on RunCloud with PHP 8.4.16 (NTS) + Zend OPcache v8.4.16, JIT disabled. We're running a Yii2 application. Since the setup, we're experiencing random TypeError and ArgumentCountError exceptions referencing internal PHP functions that do not exist anywhere in our codebase. The errors change between requests with no code deployments in between.
Confirmed environment: PHP 8.4.16 (cli) (built: Jan 19 2026 03:54:38) (NTS) Zend Engine v4.4.16 Zend OPcache v8.4.16 JIT: disabled (opcache.jit=disable)Errors observed:
Function in code Function PHP calls ErrorFeb
array_map() array_count_values() ArgumentCountError: array_count_values() expects exactly 1 argument, 2 given
array_map() array_all() TypeError: array_all(): Argument #1 ($array) must be of type array, Closure given
round() sin() ArgumentCountError: sin() expects exactly 1 argument, 2 given
file_get_contents() unlink() ErrorException: unlink(...schema.ser): No such file or directory
Key details:
None of the "called" functions (array_count_values, array_all, sin, unlink) exist anywhere in our codebase
The actual source files contain array_map, round, and file_get_contents on the reported lines
No code was deployed between errors — same code worked one day and broke the next
A different wrong function appears each time, always a different internal PHP function
The file_get_contents() → unlink() swap is destructive: it deleted a vendor file (schema.ser) instead of reading it
JIT is confirmed disabled; this is pure OPcache bytecode caching
Restarting PHP-FPM temporarily fixes it, but the errors return
**
Example — actual source (line 111 of InvoiceTotals.php):**
Error thrown:
ArgumentCountError: sin() expects exactly 1 argument, 2 given in .../InvoiceTotals.php:111php, opcache, php-8.4, yii2
It appears OPcache is resolving incorrect function pointers from PHP's internal function table during bytecode compilation or cache retrieval. Has anyone encountered this with PHP 8.4 + OPcache? Is this a known bug, or could this be related to memory corruption on the server?
