Named parameters

In PHP (and as far as I know most languages) you pass parameters to a function in a specific order. Sometimes however it would be useful to be able to pass parameters by name. The usual approach is to pass an array:

function foo(array $args=[])
$defaults = [‘bar’=>’default_bar’];
$args = array_merge($defaults, $args);

The downside of this approach is that a developer has to look at the function itself to know which parameters go in