ID: 40882 Updated by: [EMAIL PROTECTED] Reported By: guile_spam at laposte dot net -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: Linux ~~~~ 2.6.12-12mdk #1 F PHP Version: 5.2.1 New Comment:
>I guess could have the answer in the bug 24159... Right, so this is expected. Previous Comments: ------------------------------------------------------------------------ [2007-03-21 16:00:30] guile_spam at laposte dot net Description: ------------ the function "array_fill" doesn't support correctly a negative number as first parameter. If start_index is negative, then it starts with the correct value, but the next key value is always 0. I guess could have the answer in the bug 24159... Maybe the documentation have to be updated, or (I hope it will be this solution) the function array_fill have to fixed :-P Thx for all! Reproduce code: --------------- <?php print_r(array_fill(-3,5,0)); ?> Expected result: ---------------- Array ( [-3] => 0 [-2] => 0 [-1] => 0 [0] => 0 [1] => 0 ) Actual result: -------------- Array ( [-3] => 0 [0] => 0 [1] => 0 [2] => 0 [3] => 0 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40882&edit=1