|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-03-09 06:48 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2014-03-09 06:48 UTC] requinix@php.net
[2014-03-10 01:00 UTC] jake_hotson at hotmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 06:00:01 2026 UTC |
Description: ------------ PHP ver 5.4.8. Unable to test in 5.5.10 as seems incompatible with Apache 2.4.7. Script below says that orange is an apple, but if the first foreach is commented out it correctly says that it is fruity. Test script: --------------- $fruits = array( 'apple' => 'fruity', 'orange' => 'fruity', ); foreach ($fruits as &$fruit) { } foreach ($fruits as $fruit => $description) { echo "$fruit is $description<br />\n"; } Expected result: ---------------- apple is fruity orange is fruity Actual result: -------------- apple is fruity orange is apple