Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56598 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74500 invoked from network); 24 Nov 2011 21:54:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2011 21:54:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qy0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:40832] helo=mail-qy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/38-26290-31DBECE4 for ; Thu, 24 Nov 2011 16:54:28 -0500 Received: by qyk33 with SMTP id 33so2444478qyk.29 for ; Thu, 24 Nov 2011 13:54:24 -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=EFxmXDdfrf/FhbXcq18uKkZ9oXhiITpIQJcNcqowJn4=; b=gYBQyDO5yufrNRhO8rPE+f79bJBnL+rvzgLWxdBJnrRys/6eeubaHvljg5Y6zeS4Dg Blv7Y/iJO2Br7wW7P6P0TZljjK2uBctG/xC9uLK1q+vYc/C1op8mPvlRriCaB1ZpXvyk lNXcYgeb9cIUb5arecaFLtld3+ObwoceEEjDE= MIME-Version: 1.0 Received: by 10.229.183.145 with SMTP id cg17mr2639503qcb.34.1322171664734; Thu, 24 Nov 2011 13:54:24 -0800 (PST) Received: by 10.229.38.134 with HTTP; Thu, 24 Nov 2011 13:54:24 -0800 (PST) In-Reply-To: References: <20111123015008.GA12933@panix.com> <4ECEBBB8.90604@lerdorf.com> Date: Thu, 24 Nov 2011 22:54:24 +0100 Message-ID: To: Rasmus Lerdorf Cc: Yasuo Ohgaki , RQuadling@gmail.com, Daniel Convissor , PHP Internals List Content-Type: multipart/alternative; boundary=0016364d2a6d689ba104b2821429 Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: tyra3l@gmail.com (Ferenc Kovacs) --0016364d2a6d689ba104b2821429 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > >> > Isn't it better to raise notice for accessing string by string index? >> > There is no use to allowing string index access to strings. I think >> > raising notice is feasible. Isn't it? >> >> String index access is still required since they are often numeric >> strings. We could add a notice for non-numeric strings, but the check >> would slow things down a bit. > > > yeah, as I mentioned before: > "The other improvement (related but not introduced in this change) that I > suggested was that we could also trigger a notice when a "non-applicable" > string offset is passed(defining non-applicable is a little bit hard, > because of the current type-juggling rules, we have to allow $string["1"]= , > because '1" can come from a database, or get/post, where it would be a > string, not an int, but if we go with the current type juggling, > $string["2_foo_3"] would also be converted to $string[2], which isn't > really intended imo. ." > > I would vote for allowing only numbers in the string index/offset: [0-9]+ > By "allowing" I meant that we should trigger the notice if the string index contains anything else than numbers. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --0016364d2a6d689ba104b2821429--