|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-15 18:20 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 UTC |
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 )