I was wondering if someone may know an alternative to the PHP 5.6.x and higher ...
operator (or splat operator I believe its called).
What i\'m currently do
Though the splat operator ...
is similar to call_user_func_array()
:
call_user_func_array(array($this,'callAction'),
explode('@', $this->routes["authControllers"][$this->routes["uri"][$uri]]));
I think it would make more sense to pass the required arguments:
list($controller, $action) = explode('@', $this->routes["authControllers"][$this->routes["uri"][$uri]]);
$this->callAction($controller, $action);