Re: [RFC] Default expression

From: Date: Sun, 25 Aug 2024 07:00:29 +0000
Subject: Re: [RFC] Default expression
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message


On Sun, Aug 25, 2024, at 04:41, Mike Schinkel wrote:
> 
> 
>> On Aug 24, 2024 at 5:16 PM, <Rob Landers <mailto:[email protected]>> wrote:
>> 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] : [])]);
> 
> And you are one who complains about gotos!  😲
> 
> -Mike

Haha, there is a difference between production/professional code and internal tools. Internal tools
are a place to experiment and have a little fun, IMHO.

— Rob


Thread (101 messages)

« previous php.internals (#125203) next »