Bug #60039 [PATCH]: array_key_exists behaves different from isset for float keys
| From: | nikic@php.net | Date: | Tue, 11 Oct 2011 12:19:09 +0000 |
| Subject: | Bug #60039 [PATCH]: array_key_exists behaves different from isset for float keys | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164229@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60039&edit=1
ID: 60039
Patch added by: nikic@php.net
Reported by: nikic@php.net
Summary: array_key_exists behaves different from isset for
float keys
Status: Open
Type: Bug
Package: Arrays related
PHP Version: 5.4.0beta1
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: array_key_exists_patch.txt
Revision: 1318335549
URL: https://bugs.php.net/patch-display.php?bug=60039&patch=array_key_exists_patch.txt&revision=1318335549
Previous Comments:
------------------------------------------------------------------------
[2011-10-11 12:18:40] nikic@php.net
Description:
------------
array_key_exists allows only string, int and null keys. For everything else it'll throw an
error.
isset on the other hand allows floats, resources and bools too. floats are cast to int and resources
and bools are handled as ints.
array_key_exists behavior should match isset behavior.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60039&edit=1