From: [EMAIL PROTECTED] Operating system: Linux 2.4.22 i686 PHP version: 4.3.4 PHP Bug Type: Class/Object related Bug description: Class member - array key overflow
Description: ------------ See attached code. It seems that when assigning arrays in a class definition, it's possible to overflow the array key, without any sort of warning/notice/etc. This only happens in a class def, and not to a "global" namespace array. It's odd that the same code isn't used for both regular array constructs, and object array constructs (Zend Engine). ZE2 may fix this problem. Has not been tested. The logical overflow threshold is between 2147483647 and 2147483648 (where 2147483648 is a 32bit (singed) integer value of -0, if I'm not mistaken -- or 0x80000000). Note: this affects more than just negative keys as seen in code:VAL3. I don't have time to jump into the php source right now (nor am I truly qualified to do so). Please let me know if/when you need additional details. S ([EMAIL PROTECTED]) Reproduce code: --------------- http://sean.caedmon.net/php/class_array_bug.phps (http://sean.caedmon.net/php/class_array_bug.php) Expected result: ---------------- (see code) Actual result: -------------- (see code) -- Edit bug report at http://bugs.php.net/?id=26584&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26584&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26584&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26584&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26584&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26584&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26584&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26584&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26584&r=support Expected behavior: http://bugs.php.net/fix.php?id=26584&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26584&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26584&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26584&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26584&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26584&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26584&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26584&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26584&r=float