Description

Allowes named arguments1 to be used to access parameters in random order, as in JavaScript.

Syntax

function tralala(string $a, string $b, string $c)
{
    echo $a.' '.$b.' '.$c;
}
 
tralala(b: 'la', c: 'la', a: 'tra');
// tra la la

Footnotes

Footnotes

  1. https://wiki.php.net/rfc/named_params