我将用一个接受任意数量函数的简单函数来解释这个问题
function abc() {
$args = func_get_args();
//Now lets use the first parameter in something...... In this case a simple echo
echo $args[0];
//Lets remove this first parameter
unset($args[0]);
//Now I want to send the remaining arguments to different function, in the same way as it received
.. . ...... BUT NO IDEA HOW TO . ..................
//tried doing something like this, for a work around
$newargs = implode(",", $args);
//Call Another Function
anotherFUnction($newargs); //This function is however a constructor function of a class
// ^ This is regarded as one arguments, not mutliple arguments....
}
我希望现在的问题很清楚,这种情况的解决方法是什么?
更新
我忘了提到我调用的下一个函数是另一个类的构造函数类.
就像是
$newclass = new class($newarguments);