If I have one PHP function which accepts splat parameters:
function1(...$parms1) {...}
and I call this function from another function which also accepts splat parameters:
function2(...$parms2) {function1($parms2);}
the invocation of function1 appears to wrap function2 parms into another array (i.e. function1 sees an array within an array).
Is there anyway of passing the parms from function2
to function1
as is, without the implicit creation of a second parameter array?
Don't get me wrong, I can see that PHP is doing precisely what I'm asking it to do, but it would be more convenient if I could pass function2
's splat directly to function1
.
Any advice would be very much appreciated.