Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56548 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28387 invoked from network); 24 Nov 2011 01:38:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2011 01:38:40 -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 207.97.245.143 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.143 smtp143.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.143] ([207.97.245.143:36633] helo=smtp143.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/33-03584-F10ADCE4 for ; Wed, 23 Nov 2011 20:38:40 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp54.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 0665B2B096B; Wed, 23 Nov 2011 20:38:37 -0500 (EST) X-Virus-Scanned: OK Received: by smtp54.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 64F0B2B0951; Wed, 23 Nov 2011 20:38:36 -0500 (EST) Message-ID: <4ECDA01B.5090606@sugarcrm.com> Date: Wed, 23 Nov 2011 17:38:35 -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: Lester Caine CC: PHP internals References: <20111123015008.GA12933@panix.com> <20111123023108.GA172@panix.com> <4ECCB549.904@lsces.co.uk> <4ECCBC56.3050602@sugarcrm.com> <20111123141408.GA11940@panix.com> <4ECD40E2.1000601@sugarcrm.com> <4ECD48AD.1020207@sugarcrm.com> <4ECD91F4.5040303@gmail.com> <4ECD92FD.7040609@sugarcrm.com> <4ECD9998.4060203@lsces.co.uk> In-Reply-To: <4ECD9998.4060203@lsces.co.uk> 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! > But neither is introducing a potential bomb of the kind that the 'date' saga > created. The problem this change IS causing is likely to hit many live sites The claim that many live sites actually regularly use string multiple string offsets to distinguish strings from arrays sounds implausible to me. > without any real explanation as to why it is happening. And I still don't think > that the type of code that it is hitting is 'wrong', it IS just doing a lookup There's real explanation and it's in UPGRADING now. And the code is not just plain "wrong" - it relies on a bug to distinguish between array and string, when it should use proper functions instead. If you want to check if something is an array, use is_array. Using side effect of a bug and claiming that the engine now should stay broken forever because you used it doesn't make any sense. > for an array element that does not exist to decide if it needs to create it. No, it's not going for array element - it applies multiple array operations to a string without checking and relies on a bug to pass it off. That's broken, plain and simple. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227