Internals,
Seems the order or left vs right assignment evaluation has changed
somehow recently in my upgrade to PHP 5.1.4. See the following code:
---------- 8< -------------------- 8< ----------
<?php
$data = array();
$index = 0;
for ($x = 0; $x < 5; $x++) {
$data[$index] = $index++;
}
print_r($data);
?>
---------- 8< -------------------- 8< ----------
in PHP 5.0.5:
Array
(
[0] => 0
[1] => 1
[2] => 2
[3] => 3
[4] => 4
)
in PHP 5.1.4:
Array
(
[1] => 0
[2] => 1
[3] => 2
[4] => 3
[5] => 4
)
Is this a bug, a feature, or bad programmer [me]?
Dante
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php