The problem cited by call_user_func_array.

<?php
class tests{
    public function __call($m, $args)
    {
        //$m = test
        call_user_func_array($m,$args);
    }

    // test..
    public function test(&$a){
        $a = $a + 1000;
    }
}

// run.
function test(&$a){
    $a PP;
}

$cls = new tests();

$a  = 100;
$cls->test($a);

//test($a); // 101

echo ($a);
?>

1: call_user_func_array calls its own methods first? No need to add class objects?
2: after removing the class test method, let it call the test function. Errors will be reported.
Warning: Parameter 1 to test () expected to be a reference, value given i

excuse me, how can I get it to call the reference function?

Php
Jul.17,2021

Don't you read the document? it says that call_user_func and call_user_func_array cannot pass parameters

by reference.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d13a-2bae1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d13a-2bae1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?