ID: 31125
Updated by: [EMAIL PROTECTED]
Reported By: dennis at inmarket dot lviv dot ua
-Status: Open
+Status: Bogus
Bug Type: Zend Engine 2 problem
Operating System: WinXP
PHP Version: 5.0.1
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
Then reopen the old report! Never submit something twice.
Duplicate of #31118
Previous Comments:
------------------------------------------------------------------------
[2004-12-16 15:25:55] dennis at inmarket dot lviv dot ua
Description:
------------
Hey, just DONT CLOSE THE BUG IF YOU DON'T EVEN READ IT!
(This is to [EMAIL PROTECTED], who closed bug 31118)
here is SIMPLER TEST CASE - no modifications of the array itself - two
foreach loops show different contents
Reproduce code:
---------------
$a = array('key1'=>'value1', 'key2'=>'value2', 'key3'=>'value3');
foreach($a as $k=>&$v) {
echo $k . '=' . $v . "\r\n";
}
foreach($a as $k=>$v) {
echo $k . '=' . $v . "\r\n";
}
// See? No values are modified!!! All explanations to other bugs do not
cover this problem
Expected result:
----------------
key1=value1
key2=value2
key3=value3
key1=value1
key2=value2
key3=value3
Actual result:
--------------
key1=value1
key2=value2
key3=value3
key1=value1
key2=value2
key3=value2 <- should be 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31125&edit=1