What are the potential pitfalls of using call_user_func with functions that expect references in PHP?

When using `call_user_func` with functions that expect references in PHP, the references are not passed correctly, leading to unexpected behavior or errors. To solve this issue, you can use `call_user_func_array` instead, passing the function name as the first argument and an array of parameters (including references) as the second argument.

function foo(&$param) {
    $param++;
}

$value = 5;
call_user_func_array('foo', [&$value]);
echo $value; // Outputs 6