#25878 [Opn->Bgs]: Different behaviour with array indexing by using the '++' incremental operator
| From: | sniper@php.net | Date: | Wed, 15 Oct 2003 22:20:04 +0000 |
| Subject: | #25878 [Opn->Bgs]: Different behaviour with array indexing by using the '++' incremental operator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-49067@lists.php.net to get a copy of this message | ||
ID: 25878
Updated by: sniper@php.net
Reported By: cochius at advantic dot de
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: W2k / Linux
PHP Version: 4.3.2
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
..
Previous Comments:
------------------------------------------------------------------------
[2003-10-15 08:00:55] cochius at advantic dot de
The operating systems are
Version 4.1.2 on Linux and
Version 4.3.2 on W2k
------------------------------------------------------------------------
[2003-10-15 07:52:44] cochius at advantic dot de
Description:
------------
There's different behaviour in PHP Version 4.1.2 and Version 4.3.2 when
using the '++' incremental operator with the indexing variable.
Examine the example and it's different output, it's self-describing...
Reproduce code:
---------------
$r = array('val_1','val_2');
$j = 0;
while (isset($r[$j])) {
$temp_arr[$j] = $r[$j++];
}
print_r($temp_arr);
Expected result:
----------------
PHP Version 4.1.2
-----------------
Array
(
[0] => val_1
[1] => val_2
)
Actual result:
--------------
PHP Version 4.3.2
-----------------
Array
(
[1] => val_1
[2] => val_2
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25878&edit=1