I have a string containing the class name and an array of arguments.$ classname ($ args) works, but in this case I only have 1 argument in the constructorDoes anyone know how to do this with the args extension?
$reflection = new ReflectionClass($classname); $object = $reflection->newInstanceArgs($args);
http://php.net/reflection
Haha, I just asked this question: PHP passed the class as a link?
And you cannot expand $args. You can try to skip $args[0], $args[1], etc.
$args
$args[0], $args[1]