PHP 4.0 Bug #10264: strange associative array behaviour
| From: | shane dot wright at ecustomeropinions dot com | Date: | Tue, 10 Apr 2001 16:33:48 +0000 |
| Subject: | PHP 4.0 Bug #10264: strange associative array behaviour | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-51371@lists.php.net to get a copy of this message | ||
From: shane.wright@ecustomeropinions.com
Operating system: RedHat 7
PHP version: 4.0.4pl1
PHP Bug Type: Arrays related
Bug description: strange associative array behaviour
Not sure if this is a bug or not, but I can't find any
reference to it in the documentation/user comments/FAQs
Basically, if you build an associative(ish) array like
this:
$period = -24;
for ($i=$period; $i<=0; $i++) {
$data[$i] = $myvalues[$anotherindex];
};
It works ok, the array contains (in order) elements with
the inidices -24 to 0.
But, if $period is decreased so that over 25 elements are
introduced, the order goes off...
basically elements with indices -24 to 0 are fine, but all
the other ones come, in order, _after_ index 0.
Any ideas?
Shane
--
Edit Bug report at: http://bugs.php.net/?id=10264&edit=1