Re: [RFC] Default expression

From: Date: Mon, 26 Aug 2024 18:49:56 +0000
Subject: Re: [RFC] Default expression
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-125286@lists.php.net to get a copy of this message
On Aug 26 2024, at 2:39 pm, Bilge <bilge@scriptfusion.com> wrote: > > I like this approach. I'm still not sure I'd want to pursue adding exclusions, but if > we can identify something that's obviously bad and/or dangerous then we can consider that short > list for exclusion. That is much more compelling than starting out by banning everything and > arbitrarily whitelisting those things someone personally has a use for. Perhaps the answer could be to only allow the use of default when the assigned default value is a scalar value -- no objects, arrays, enums, etc (and no mixed ).. It seems like a compromise that accomplishes a healthy portion of the stated use-cases while avoiding many of the foot-guns scenarios. Coogle (PS - I'm going to start signing off with my old-skool nickname around here, feel free to reference me using it to disambiguate since there are multiple Johns)

« previous php.internals (#125286) next »