Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56543 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16919 invoked from network); 23 Nov 2011 23:43:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2011 23:43:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.173 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.173 smtp173.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.173] ([207.97.245.173:59304] helo=smtp173.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/81-03584-1158DCE4 for ; Wed, 23 Nov 2011 18:43:14 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp27.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id A1900118C68; Wed, 23 Nov 2011 18:43:11 -0500 (EST) X-Virus-Scanned: OK Received: by smtp27.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 0787D118C75; Wed, 23 Nov 2011 18:43:10 -0500 (EST) Message-ID: <4ECD850D.3050109@sugarcrm.com> Date: Wed, 23 Nov 2011 15:43:09 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Mike Robinson CC: 'Gustavo Lopes' , "internals@lists.php.net" References: <20111123015008.GA12933@panix.com> <20111123023108.GA172@panix.com> <4ECCB549.904@lsces.co.uk> <4ECCBC56.3050602@sugarcrm.com> <20111123141408.GA11940@panix.com> <20111123153100.GB13420@panix.com> <4ECD4231.7070306@sugarcrm.com> <000301ccaa36$f0b6ced0$d2246c70$@ca> In-Reply-To: <000301ccaa36$f0b6ced0$d2246c70$@ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > As distasteful as it seems, it absolutely should be reverted IMHO. You seem to misunderstand something here. This behavior is a direct consequence of string offset result being a string. To revert it means to reintroduce broken string-offset pseudo-var-type that led to huge amount of bugs, never worked reliably and may as well be incompatible with current engine after all changes that were made after that. Reintroducing old broken way of handling string offsets is a MAJOR engine refactoring, and doing it in RC stage is a worst idea ever. I do not see any way to treat result of the offset operation not as a string without engine refactoring, if you do - please explain how. If the offset is handled as a string, the direct consequence is that is behaves as a string, which means every operation working on string works on it. It's not a question of taste, it's how the engine worked. In 5.3, the engine had this weird pseudo-type called string offset, which led to a lot of problems, one of them being that $a[0][0] didn't work because DIM opcodes didn't know how to handle this pseudo-type, and had to be handled specially on each corner (and produced tons of bugs because of it). I do not consider going back to that as an option. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227