If you want to ignore arguments in excess, your function may have a rest parameter collecting them. The following will run without error: ```php function foo($c, $a, ...$unused) { var_dump($a, $c); } $args = [ 'a' => 'the a value' , 'b' => 'the b value' , 'c' => 'the c value' ]; foo(...$args); ```
This seems like a fairly clean alternative syntax with the only downside is an unused variable.
Thanks for the idea! -ralph -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php