Re: Allow (...)->foo() expressions not only for `new`

From: Date: Tue, 26 Feb 2013 07:43:03 +0000
Subject: Re: Allow (...)->foo() expressions not only for `new`
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-66231@lists.php.net to get a copy of this message
Hi! > - in some cases destruction of temporary result may cause destruction of > final result > > ((object)(array("a"=>"b")))->a = "c"; // temporary object > may be destroyed > before assignment I remember now this was somewhat of a problem - when the temp is destroyed? I.e. I guess we could stick FREE_TMP at the end of the expression but then indeed it has to happen after assignment is done, and that may require longer memory than the parser currently has. I didn't look at the patch yet so not sure how it works out, will do soon. >> I hope that this change is trivial enough to not require dragging it >> through the whole RFC process. If there are no objections I'd commit it >> sometime soon. Please do not rush it. It looks simple but there might be very complex edge cases with dealing with temps and lifetimes, we need to check them thoroughly. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#66231) next »