<?php
function increment(&$var)
{
echo 'Variable with value '.$var.' has been passed.'.PHP_EOL;
$var++;
}
$a = 1;
call_user_func_array('increment', [$a]);
echo $a."\n";
Warning: increment(): Argument #1 ($var) must be passed by reference, value given in /in/erHl3 on line 10
Variable with value 1 has been passed.
1
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
Warning: increment(): Argument #1 ($var) must be passed by reference, value given in /in/erHl3 on line 10
Variable with value 1 has been passed.
1