On 24/08/2024 22:14, Rob Landers wrote:
On Sat, Aug 24, 2024, at 18:49, Bilge wrote:

as soon as two or more nullable arguments are involved

I'm not sure what you mean here. I use this method all the time :) much to the chagrin of some of my coworkers.

function stuff($foo = 'bar', $baz = 'world');

stuff(...[ ...($foo ? ['foo' => $foo] : []), ...($baz ? ['baz' => $baz] : [])]);

You're right; splat with keys does work. This is something my RFC currently glosses over and should probably be rectified!

Cheers,
Bilge

Reply via email to