Answer the question
In order to leave comments, you need to log in
Creating an object with passing arguments like call_user_func_array
In a function that can be passed an unlimited number of arguments, I can get them all as an array using func_get_args . However, I can call another function with the same arguments using call_user_func_array .
But I want to create an object by passing to its constructor the arguments received in the parent function using func_get_args . Any ideas how to do it?
Thank you
Answer the question
In order to leave comments, you need to log in
stackoverflow.com/questions/3395914/pass-arguments-from-array-in-php-to-constructor
Although, of course, I would think if it's worth passing the array as one parameter and not piling it up.
What does parent function mean? Maybe a parent class constructor? It's just kind of weird to talk about a function in terms of inheritance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question