Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56486 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69326 invoked from network); 23 Nov 2011 09:06:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2011 09:06:36 -0000 Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:60320] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/83-45113-997BCCE4 for ; Wed, 23 Nov 2011 04:06:33 -0500 Received: by vcbgb30 with SMTP id gb30so1190541vcb.29 for ; Wed, 23 Nov 2011 01:06:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=P3xg4e3icw/acv7LByhgHw2YE0/uzDr6cqvqy2IFpdg=; b=hk2LVaUsr9g6uXMEJ4wdPmOrMvmoVQfwPNT13WZ6EAlOgB+lQAOMHo9gZcQy69t7TK Udgifs7IR02EISaTz4YWv77CeV2c0g4Tcuyx3J5tfWnD0KQ2PwFGc7UpsrCMm9W/rGGo X0pU72CneX24iCvahP1PlCeGSo5nnBK2kAb48= Received: by 10.52.33.50 with SMTP id o18mr24261528vdi.42.1322039190076; Wed, 23 Nov 2011 01:06:30 -0800 (PST) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.220.108.7 with HTTP; Wed, 23 Nov 2011 01:06:09 -0800 (PST) In-Reply-To: <4ECCB549.904@lsces.co.uk> References: <20111123015008.GA12933@panix.com> <20111123023108.GA172@panix.com> <4ECCB549.904@lsces.co.uk> Date: Wed, 23 Nov 2011 17:06:09 +0800 X-Google-Sender-Auth: 7yA8d4f7hUoDGbKxk6IA6gfvx2A Message-ID: To: Lester Caine Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: laruence@php.net (Laruence) Hi: I think it is really need make some difference between {} and [] :) thanks On Wed, Nov 23, 2011 at 4:56 PM, Lester Caine wrote: > Etienne Kneuss wrote: >>>> >>>> AFAIK this is one of the change that was explicitly put in to make it >>>> >> =C2=A0more consistent. >>> >>> > >>> > =C2=A0But now it breaks code in the wild. =C2=A0I came across this du= e to an >>> > =C2=A0isset() in PEAR now passing when it didn't before. >> >> PEAR is definitely doing some strange things:) =C2=A0Is it checking indi= ces >> of a variables without checking first if it's an array? >> Sounds like the comeback of "Please don't break bad code!" seen with >> is_a:) >> >> IMO it still makes sense to make that change for 5_4, makes everything >> less magic and more consistent. > > I'm having a lot of trouble with working out WHAT is going on here at all= . > > https://bugs.php.net/bug.php?id=3D60362 as far as I can tell is using arr= ay > and sub array elements? Strings don't come into the equation? So I check = if > I've populated the sub-array be seeing if a sub array element exists, suc= h > as would happen if I've populated the array in a previous scan through, b= ut > now I'm getting sub array elements caused by some conversion of the strin= g > making up the element above? > > Now that this activity has been highlighted it may well explain why I'm > getting problems with a section of code that is building a complex tree > structure array from GEDCOM data strings ... since the code is not my own > working out where things were breaking down was a problem I simply do not > have time to investigate. It currently fails on PHP5.4 and it took some t= ime > to tidy the code on 5.3 ... and that still only runs with warnings switch= ed > off :( > > So what is the current preferred method of checking if sub array elements > have been created manually, rather than as 'less magic' string elements? > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=3Dcontact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk// > Firebird - http://www.firebirdsql.org/index.php > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Laruence =C2=A0Xinchen Hui http://www.laruence.com/