|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-22 17:06 UTC] derick@php.net
[2005-09-22 17:07 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 01:00:01 2025 UTC |
Description: ------------ I noticed a slight change in the order some instructions get executed. The execution order of instructions for a code like $result[$base]=$base++; differs from PHP 5.1 to previous versions so that the $result variable also has different values as follows: PHP 4.3.10 : array(1) { [0]=> int(0) } PHP 5.0.3 : array(1) { [0]=> int(0) } PHP 5.1.0b3 : array(1) { [1]=> int(0) } PHP 5.1.0RC1 : array(1) { [1]=> int(0) } Reproduce code: --------------- $base=0; $result[$base]=$base++; var_dump($result); Expected result: ---------------- To keep compatibility with PHP 4.x and 5.0.x: array(1) { [0]=> int(0) } Actual result: -------------- array(1) { [1]=> int(0) }