Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56290 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52731 invoked from network); 11 Nov 2011 21:40:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Nov 2011 21:40:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; 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:46634] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/D7-09898-E469DBE4 for ; Fri, 11 Nov 2011 16:40:31 -0500 Received: by faan2 with SMTP id n2so4785107faa.29 for ; Fri, 11 Nov 2011 13:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=WfLnZP12XWlVK+lknvqTMwfHTRoy62TP8AeSj7u4CcY=; b=OKMtoSY+4lADw++3xs4np/tRHSfjiTD7qIoHR4fIiqnm6hXxz+JlTYb1ufuCNGH/i2 +jGqyNJ6ZFms+J6FSlDBCl5V3bFtkwNIHllT/Dq+pm3vGZVM4Kb4GVbm+dhpFUiD45zG KI8kZ7/gvHBdMtWF+wCVvjrIVF28qRJikOqks= MIME-Version: 1.0 Received: by 10.152.130.71 with SMTP id oc7mr4344920lab.25.1321047627742; Fri, 11 Nov 2011 13:40:27 -0800 (PST) Received: by 10.152.2.70 with HTTP; Fri, 11 Nov 2011 13:40:27 -0800 (PST) Date: Fri, 11 Nov 2011 22:40:27 +0100 Message-ID: To: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: [PHP-DEV] array_key_exists with float keys (bug #60039) From: nikita.ppv@googlemail.com (Nikita Popov) 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