From: dave at codewhore dot org
Operating system: Linux 2.4
PHP version: 5CVS-2003-05-31 (dev)
PHP Bug Type: Arrays related
Bug description: array_key_exists no longer juggles types correctly
Hi:
The following script produces different output with PHP 5 HEAD than it
does with the PHP 4.3 stable branch:
<?php
$f[1] = 1;
var_dump(array_key_exists('1', $f));
?>
With PHP 4.3 stable, I get:
bool(true)
With PHP 5 HEAD, I get:
bool(false)
It appears that PHP 5 HEAD is missing the call to HANDLE_NUMERIC() in
zend_hash_exists (Zend/zend_hash.c). The ZE2 changelog shows that it was
moved:
move HANDLE_NUMERIC() from the hash table
implementation upstream to the places that
actually need to use it.
But I'm unable to figure out where the equivalent functionality was added
back. Am I missing something?
Thanks in advance,
- Dave
--
Edit bug report at http://bugs.php.net/?id=23935&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23935&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23935&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23935&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23935&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23935&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23935&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23935&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23935&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23935&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23935&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23935&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23935&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23935&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23935&r=gnused