我想包装一个接受无限数量参数的现有函数,例如这是现有函数:
function T()
{
$args = func_num_args();
// Do stuff with arguments.
}
我现在想包装它,例如
/*
* This function shall also take unlimited arguments,
* and just pass them on to T().
*/
function myT()
{
// TODO: Take all arguments and pass them on to T().
$result = T();
// Do stuff with the result of T().
}
但是,我无法弄清楚如何将无限参数传递给T()
in myT()
。