Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56568 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87218 invoked from network); 24 Nov 2011 10:49:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2011 10:49:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:64584] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/16-46656-9312ECE4 for ; Thu, 24 Nov 2011 05:49:31 -0500 Received: by ghrr20 with SMTP id r20so2663085ghr.29 for ; Thu, 24 Nov 2011 02:49:26 -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:content-type; bh=gbeShrbrE5GhLYO0x0LczivZc05JOuH+fbmwI5AGW98=; b=BBW1CKLuRj5DOCKvd6DeBFlHgMUW4i8z3ewC+M6ic0BZIp93GzfXegcL0iqnLG/oxJ 51qm4c5JZRm8MHEbUgHkqUA73Fp/gvMnT7nCQiirZndzmkDfVI1qZcA18RGwrDNW57zk k6kaJ/YW0Q5mU7KMpZqdOBuRRVuXTzYYw9QnI= Received: by 10.101.112.10 with SMTP id p10mr6401776anm.80.1322131766180; Thu, 24 Nov 2011 02:49:26 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.100.127.18 with HTTP; Thu, 24 Nov 2011 02:48:45 -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> <4ECD40E2.1000601@sugarcrm.com> <4ECD48AD.1020207@sugarcrm.com> <4ECD91F4.5040303@gmail.com> <4ECDAEE5.7020205@gmail.com> <4ECE0887.3030109@lsces.co.uk> <4ECE0AC3.1050405@sugarcrm.com> <4ECE0F47.1040504@lsces.co.uk> Date: Thu, 24 Nov 2011 19:48:45 +0900 X-Google-Sender-Auth: FXApPTTKOAypOd9EypbW5qDKmrQ Message-ID: To: 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: yohgaki@ohgaki.net (Yasuo Ohgaki) Just a quick note for this issue. If I remember correctly, PHP is working this way at least from PHP 3.0.x. $a[123] // integer index $a['123'] // integer index $a['123 abc'] // string index $a['123.123'] // string index Automatic string to integer conversion only happened if index string has numeric chars. It seems some people are confused. isset($a[0][0]) became true if and only if $a is string. If there is a code broken by this behavior, it would be enough for add is_array() if (is_array($a) && isset($a[0][0])) I suppose. -- Yasuo Ohgaki yohgaki@ohgaki.net