Hi
I have a PHP problem I can't solve.
I'm using variable names as class constructors in a project, a la:
$foo = "ClassName" ;
$bar = new $foo();
But what I can't work out is how to pass a variable number of
parameters to the constructor; call_user_func_ array looks good, but I
don't think that'll work in the same way as 'new'.
So what I'm trying to do is:
$bar = new $foo($a, $b, $c);
Where I'm getting the parameters for the constructor from func_get_args
and as such, I don't know many parameters there are.
Any suggestions?
Thanks,
Justin