PHP: Performance: splat operator or reflection
问题 In an app that I'm creating, I need to pass an unknown number of parameters to an unknown constructor of a class. The class (+ namespace) is a string, that is in $class. The parameters are in an array. This application will be deployed over a couple of months, so we thought we could develop it already in PHP 5.6. So I thought that the solution of this would be: $instance = new $class(...$args); This is working... But my collegues don't want to accept this, because the CI server does not