I’m pretty stuck here for what to do. I basically want to take all the arguments entered into function one:
func1('hey', 'hey2', 'hey3');
and then run func2 with the same arguments:
func2('hey', 'hey2', 'hey3');
I’ve tried this:
$arguments = func_get_args();
call_user_func_array(array($this, "func2"), $arguments);
but it doesn’t seem to be working correctly? Any ideas?
Turns out the code should be:
$arguments = func_get_args();
call_user_func_array(array($this, “func2”), $arguments[0]);
Woops 🙂 Thanks everyone
You can do it simply like this :
Hope this helps 🙂