From: ait-ali dot mohamed at laposte dot net Operating system: WIN 2K PHP version: 5.1.1 PHP Bug Type: Arrays related Bug description: array key assignation
Description: ------------ It seems to be an bas assignation for the array. The engine begins to increment the variable, before assign in the array's key. Reproduce code: --------------- <? $table = array(); $i = 0; $table [$i][0] = $i++; print_r($table); ?> Expected result: ---------------- Array ( [0] => Array ( [0] => 0 ) ) Actual result: -------------- Array ( [1] => Array ( [0] => 0 ) ) -- Edit bug report at http://bugs.php.net/?id=35709&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35709&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35709&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35709&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35709&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35709&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35709&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35709&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35709&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35709&r=support Expected behavior: http://bugs.php.net/fix.php?id=35709&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35709&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35709&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35709&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35709&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35709&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35709&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35709&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35709&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35709&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35709&r=mysqlcfg