Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56519 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63964 invoked from network); 23 Nov 2011 18:22:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2011 18:22:54 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:44017] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/62-47904-DF93DCE4 for ; Wed, 23 Nov 2011 13:22:53 -0500 Received: by ggnk1 with SMTP id k1so1893637ggn.29 for ; Wed, 23 Nov 2011 10:22:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ORXmzAyrKKbK7f7jrTR+lg2jw8ShgNP2dlevdmXDx4s=; b=rYSpXp9LYhkqWUNKNXtbJQHMR4fFaAC8G08C0oML94ZKfsDAj0jAYv0VkKY3dPaYhQ M26cUmv6iGMVorBMy/T0jKymedl2Jnm/Fs8u3Rw5q8Q0W4rGszCI5kLR8jK37mjZ2/hz GaXbtrb8nSAtsnNYWBAbXpIi61OHLKv4WWZBA= MIME-Version: 1.0 Received: by 10.236.116.9 with SMTP id f9mr37066635yhh.0.1322072570430; Wed, 23 Nov 2011 10:22:50 -0800 (PST) Received: by 10.146.4.4 with HTTP; Wed, 23 Nov 2011 10:22:50 -0800 (PST) In-Reply-To: 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> Date: Wed, 23 Nov 2011 19:22:50 +0100 Message-ID: To: RQuadling@gmail.com Cc: Daniel Convissor , Stas Malyshev , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: pierre.php@gmail.com (Pierre Joye) On Wed, Nov 23, 2011 at 6:58 PM, Richard Quadling wrote: > Just looking for any test relating to isset() to see what tests will now fail. > > Neither of the isset() tests ext/standard/tests/general_functions look > at arrays with associative indices. > > The behaviour with regard to unavailable associative indices has no tests. > > But using loose typing as a fallback for non existent keys seems > really really wrong. > > Especially if the key is a constant. On what planet should ... > > isset($arr['exists']['test_existance']) should become isset($arr['exists'][0]) > > That just seems really wrong and the work around is awful. That's exactly why I stoped to use this syntax a long time ago. And I was in favor to deprecate it and actually remove it the next major release (6 that is). But that's another discussion. Unless I'm mistaken it seems that we have a clear and vicious BC break here, the kind of changes that are annoying to catch and does not bring a lot of benefits to PHP (given the actual usage of this syntax). I would go with a revert, add tests and never change this behavior again. It is a confusing enough topic. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org