Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66231 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60709 invoked from network); 26 Feb 2013 07:43:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2013 07:43:09 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 173.203.6.139 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 173.203.6.139 smtp139.ord.emailsrvr.com Linux 2.6 Received: from [173.203.6.139] ([173.203.6.139:46122] helo=smtp139.ord.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/70-57982-C876C215 for ; Tue, 26 Feb 2013 02:43:08 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp26.relay.ord1a.emailsrvr.com (SMTP Server) with ESMTP id 6A9A81C0095; Tue, 26 Feb 2013 02:43:05 -0500 (EST) X-Virus-Scanned: OK Received: by smtp26.relay.ord1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 7E9B01C00C3; Tue, 26 Feb 2013 02:43:04 -0500 (EST) Message-ID: <512C6787.3040603@sugarcrm.com> Date: Mon, 25 Feb 2013 23:43:03 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Nikita Popov CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Allow (...)->foo() expressions not only for `new` From: smalyshev@sugarcrm.com (Stas Malyshev) 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