It would be cool if associative arrays could be used to pass named parameters to a function, i.e.
function foo($bar, $baz=null) {
...
}
$args = ['baz'=>'String', 'bar'=>123];
foo(...$args); // equivalent to foo(123, 'String')
It would be cool if associative arrays could be used to pass named parameters to a function, i.e.
function foo($bar, $baz=null) {
...
}
$args = ['baz'=>'String', 'bar'=>123];
foo(...$args); // equivalent to foo(123, 'String')