Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56581 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44801 invoked from network); 24 Nov 2011 20:35:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2011 20:35:53 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.210.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:53985] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/32-26290-8AAAECE4 for ; Thu, 24 Nov 2011 15:35:53 -0500 Received: by iakc1 with SMTP id c1so3812003iak.29 for ; Thu, 24 Nov 2011 12:35:50 -0800 (PST) Received: by 10.42.137.69 with SMTP id x5mr9065769ict.19.1322166950397; Thu, 24 Nov 2011 12:35:50 -0800 (PST) Received: from [192.168.200.5] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id p16sm91414344ibk.6.2011.11.24.12.35.49 (version=SSLv3 cipher=OTHER); Thu, 24 Nov 2011 12:35:49 -0800 (PST) Message-ID: <4ECEAAA4.8010800@lerdorf.com> Date: Thu, 24 Nov 2011 12:35:48 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Larry Garfield CC: 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> <4ECD37D9.8090604@lsces.co.uk> <4ECEA547.9070605@garfieldtech.com> In-Reply-To: <4ECEA547.9070605@garfieldtech.com> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: rasmus@lerdorf.com (Rasmus Lerdorf) On 11/24/2011 12:12 PM, Larry Garfield wrote: > On 11/23/2011 12:13 PM, Lester Caine wrote: >> Richard Quadling wrote: >>> I agree with Daniel on this. >>> >>> Just looking for any test relating to isset() to see what tests will >>> now fail. >> >> So it's not just me :) >> I am seeing this break real world projects and can't see a easy way to >> fix the break. There is nothing really wrong with the current code >> except that the sub keys have yet to be populated. > > This is going to be a huge problem for Drupal. Drupal uses deep > associative array structures a lot, by design. That means we isset() or > empty() on arrays a lot. I haven't had a chance to test it yet, but I > see this change breaking, um, A LOT. And as Daniel noted, the fix is to > turn one line of very readable code into 8 lines of hard to read code. > > This is not a step forward by any metric I can imagine. It's changing > long-standing behavior for no real benefit I can see except perhaps > strict adherence to a doc page. However, PHP has always been an > "implementation is the standard" language, which means this is a > language API change. > > Please roll it back to avoid breaking a crapton of existing, legitimate, > non-buggy code. I had a quick look through the Drupal code. I don't see a single place that this is done where a deeply nested array index is applied to a string. I think you are misunderstanding what has changed here. -Rasmus