note 109278 added to function.array-fill
| From: | Anonymous | Date: | Mon, 02 Jul 2012 08:05:08 +0000 |
| Subject: | note 109278 added to function.array-fill | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188998@lists.php.net to get a copy of this message | ||
when i am using the array_fill with - integer it Giving be below array
$b = array_fill(-2, 4, 'pear');
Array
(
[-2] => pear
[0] => pear
[1] => pear
[2] => pear
)
But it should be
Array
(
[-2] => pear
[-1] => pear
[0] => pear
[1] => pear
)
am i right or there is some logic behind this. please explain me
----
Server IP: 182.18.132.21
Probable Submitter: 115.119.92.50
----
Manual Page -- http://www.php.net/manual/en/function.array-fill.php
Edit -- https://master.php.net/note/edit/109278
Del: integrated -- https://master.php.net/note/delete/109278/integrated
Del: useless -- https://master.php.net/note/delete/109278/useless
Del: bad code -- https://master.php.net/note/delete/109278/bad+code
Del: spam -- https://master.php.net/note/delete/109278/spam
Del: non-english -- https://master.php.net/note/delete/109278/non-english
Del: in docs -- https://master.php.net/note/delete/109278/in+docs
Del: other reasons-- https://master.php.net/note/delete/109278
Reject -- https://master.php.net/note/reject/109278
Search -- https://master.php.net/manage/user-notes.php