I’ve some code that creates ad instance with a dynamic class (i.e. from a variable):
$instance = new $myClass();
Since the constructor has different argument count depending on $myClass value, How do I pass a variable list of arguments to the new statement? Is it possible?
You can also inspect the constructor in the above code: