ID:               35070
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tokul at users dot sourceforge dot net
-Status:           Feedback
+Status:           Closed
 Bug Type:         Arrays related
 Operating System: Linux Debian Sarge
 PHP Version:      4.4.1
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2005-11-02 20:47:06] [EMAIL PROTECTED]

Please the next snapshot, sometimes there is a short delay.

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

[2005-11-02 20:43:13] tokul at users dot sourceforge dot net

I know about 35067 bug, but it is still reproducable in
php4-STABLE-200511021752

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

[2005-11-02 19:03:12] tokul at users dot sourceforge dot net

Description:
------------
next() does not advance the internal array pointer, if it is run on
global variable inside function.

Reproduce code:
---------------
global $test;
$test=array(1=>'one',2=>'two',3=>'three');
function test() {
  global $test;
  echo current($test)."\n";
  next($test);
  echo current($test)."\n";
  next($test);
  echo current($test)."\n";
}
test();

Expected result:
----------------
one
two
three

Actual result:
--------------
one
one
one


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


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

Reply via email to