Re: [RFC] [Discussion] Clone with

From: Date: Tue, 18 Apr 2023 09:16:37 +0000
Subject: Re: [RFC] [Discussion] Clone with
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-120064@lists.php.net to get a copy of this message
wt., 18 kwi 2023 o 10:20 Tim Düsterhus <tim@bastelstu.be> napisał(a): > Hi > > On 4/18/23 10:10, Rowan Tommins wrote: > > 2) How does this interact with an __clone() method? I'm guessing the > > __clone() would be called first, and then the with-clause applied? > > > > More generally the order of operations with regard to possible side > effects and/or exceptions would be interesting. > > clone $something with { > foo() => bar(), > quux() => baz(), > }; > Just noticed the "Property name expressions" and am wondering if it could be a separate feature allowing for passing named arguments to functions/constructors in the same fashion? $something = new Something( foo() => bar(), quux() => baz(), ); Cheers, Michał Marcin Brzuchalski

« previous php.internals (#120064) next »