In the function that you can pass unlimited number of arguments, I can get them all as an array using func_get_args
. At the same time, I can call another function with the same arguments with call_user_func_array
But I want to create an object by passing its constructor the arguments received in the parent function, using func_get_args
. Any idea how to do it?