ID:               40768
 User updated by:  abc at def dot ghi
-Reported By:      rave235 at gmail dot com
+Reported By:      abc at def dot ghi
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: winxp
 PHP Version:      5.2.1
 New Comment:

wonder if someone can check this on linux build if its win issue.


Previous Comments:
------------------------------------------------------------------------

[2007-03-09 18:13:08] abc at def dot ghi

Description:
------------
i use just build i downloaded from site (5.2.1) no exts, no
optimizers.
it seem the $a,$b keep same internal pointer, this is quite serious
error cos $b=$a should create separate array copy and it does but
without the inner pointer.
if you replace $b=$a with $b=array(1,2,3); it works as expected

this was reported and ignored by someone on solaris before as well--
#40608


Reproduce code:
---------------
$a=array(1,2,3);
$b=$a;
        
foreach($a as $A)
{
     foreach($b as $B)
      {
        echo "$A,$B\n";
        break;
      }
}

Expected result:
----------------
1,1
2,1
3,1

Actual result:
--------------
1,1
2,1
3,1
2,1
3,1
2,1
3,1
--infinite-


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40768&edit=1

Reply via email to