Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56595 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71170 invoked from network); 24 Nov 2011 21:49:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2011 21:49: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:36734] helo=mail-qy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/87-26290-4EBBECE4 for ; Thu, 24 Nov 2011 16:49:26 -0500 Received: by qyk33 with SMTP id 33so2443344qyk.29 for ; Thu, 24 Nov 2011 13:49:20 -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=3vM5TdT+37wkL63jnqErBBUNTfj6/kqjyLVvyERs6lw=; b=DoR59AUFGs992mv0V9aUzpSNa7Db/qUJVtHoYnK4jl4Ec+v04+GwU0kx+WZKc7HSUG shiHI3tUuj9yh/B1LQpkGU57aMBcK6vu8oSkWGqwBrMCh9CyjEMtR89AZE2mRo0Dcm/c frLmgoMJyLX74Dp48ZOEjZgTx1PzJmI/mUC9Q= MIME-Version: 1.0 Received: by 10.229.67.5 with SMTP id p5mr3530886qci.148.1322171360590; Thu, 24 Nov 2011 13:49:20 -0800 (PST) Received: by 10.229.38.134 with HTTP; Thu, 24 Nov 2011 13:49:20 -0800 (PST) In-Reply-To: References: <20111123015008.GA12933@panix.com> Date: Thu, 24 Nov 2011 22:49:20 +0100 Message-ID: To: Yasuo Ohgaki Cc: RQuadling@gmail.com, Daniel Convissor , PHP Internals List Content-Type: multipart/alternative; boundary=0016e64bff5a47baf004b28202d5 Subject: Re: [PHP-DEV] 5.4 regression: non-existent sub-sub keys now have values From: tyra3l@gmail.com (Ferenc Kovacs) --0016e64bff5a47baf004b28202d5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Nov 24, 2011 at 10:44 PM, Yasuo Ohgaki wrote: > Hi all, > > I should think twice before seding mail. "abc" as array index is > converted to 0 since it's not a integer. So with current code is > behave consistently with regards to string to long conversion. > > However, > > PHP 5.3 > php -r '$s =3D "abc"; var_dump($s[0]["bar"]);' > PHP Fatal error: Cannot use string offset as an array in Command line > code on line 1 > > PHP 5.4 > ./php -r '$s =3D "abc"; var_dump($s[0]["bar"]);' > string(1) "a" > > 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? agree, and I also suggested adding this notice. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --0016e64bff5a47baf004b28202d5--