|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-05-10 21:22 UTC] yektaweb at gmail dot com
Description:
------------
Zend affects on arrays (PHP Version 5.1.2)
Reproduce code:
---------------
<?php
$fruits = array ("h" => "orange", "b" => "banana", "c" => "apple");
foreach ($fruits as $value)
{
$my_f = key($fruits);
echo $my_f . '<br><br>';
next($fruits);
}
?>
Expected result:
----------------
h
b
c
Actual result:
--------------
b
b
c
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
The following code will not affected by Zend Opt. foreach ($arr as $key => $value) { echo "Key: $key; Value: $value<br />\n"; }