|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-02 23:42 UTC] derick@php.net
[2004-12-03 10:27 UTC] cow at neondragon dot net
[2004-12-03 10:43 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 05:00:01 2025 UTC |
Description: ------------ I'm pretty sure this isn't supposed to happen - it didn't happen with earlier versions of PHP, and nothing in the manual documents it. It happens with the RC of 4.3.10. Reproduce code: --------------- <?php $foo = array(1,2,3); foreach ($foo as $i) { print_r($i); } /* Result of code: Array ( [0] => 1 [1] => 0 ) Array ( [0] => 2 [1] => 1 ) Array ( [0] => 3 [1] => 2 ) */ ?> Expected result: ---------------- The string 1, then string 2, then string 3 - not arrays each time.