Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56397 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99397 invoked from network); 18 Nov 2011 16:02:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2011 16:02:00 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.161.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:56788] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1A/8F-06569-6CC76CE4 for ; Fri, 18 Nov 2011 10:41:59 -0500 Received: by faan2 with SMTP id n2so4761313faa.29 for ; Fri, 18 Nov 2011 07:41:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0WQeDKHDoTHmPb69yQoZ2FE2If8eVFCsWAl9JmDTztw=; b=ktS7T+C58jyiFlOnHjXJiJvrXkCUhEkZgNmVVbvyAKiwd8fSN0UZ3UJpmAxGnom4PQ yhQOTzD9cnB+dr9zDEHDWNsg6cBPel7NBZsPERkYztKn+xQTc8eRhvOCfpUPRXRGvSnT CHGLpH6KEZ+9BbUtmTGXpb+pSmtfaXK25NUNQ= MIME-Version: 1.0 Received: by 10.152.132.39 with SMTP id or7mr2321911lab.14.1321630863899; Fri, 18 Nov 2011 07:41:03 -0800 (PST) Received: by 10.152.26.111 with HTTP; Fri, 18 Nov 2011 07:41:03 -0800 (PST) In-Reply-To: References: Date: Fri, 18 Nov 2011 16:41:03 +0100 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] array_key_exists with float keys (bug #60039) From: nikita.ppv@googlemail.com (Nikita Popov) *push* On Fri, Nov 11, 2011 at 10:40 PM, Nikita Popov wrote: > Hi internals! > > I'd like to get some attention to bug #60039 [1]. It is about the > behavior of array_key_exists with "unusual" keys like floats, bools > and resources. Currently array_key_exists throws a warning if such a > key is passed. isset() on the other hand (and native array accesses in > general) treat them as valid keys, with floats being converted to ints > and bools and resources treated just like ints. > > I would like to see array_key_exists behave consistent with > isset($array[$key]) / $array[$key]. The bug has a patch attached that > does this. > > I don't think that this change has any BC impact as it only *removes* warnings. > > Nikita > > [1]: https://bugs.php.net/bug.php?id=60039 >