#44965 [Opn]: Zend affects on arrays
by Yektaweb At Gmail Dot Com other posts by this author
May 10 2008 2:43PM messages near this date
#44965 [Com]: Zend affects on arrays
|
#44965 [Opn]: Zend affects on arrays
ID: 44965
User updated by: yektaweb at gmail dot com
Reported By: yektaweb at gmail dot com
Status: Open
Bug Type: Arrays related
Operating System: win xp
PHP Version: 5.2.6
New Comment:
The following code will not affected by Zend Opt.
foreach ($arr as $key => $value) {
echo "Key: $key; Value: $value<br /> \n";
}
Previous Comments:
------------------------------------------------------------------------
[2008-05-10 21:29:08] yektaweb at gmail dot com
I am using
Apache/2.2.0
Zend Optimizer v3.3.0
Zend SG Suite 3.1.0
------------------------------------------------------------------------
[2008-05-10 21:22:05] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44965&edit=1
Thread:
Yektaweb At Gmail Dot Com
derick
Crrodriguez At Suse Dot De
Yektaweb At Gmail Dot Com
Yektaweb At Gmail Dot Com
|