ID: 35070
Updated by: [EMAIL PROTECTED]
Reported By: tokul at users dot sourceforge dot net
-Status: Open
+Status: Feedback
Bug Type: Arrays related
Operating System: Linux Debian Sarge
PHP Version: 4.4.1
New Comment:
Please the next snapshot, sometimes there is a short delay.
Previous Comments:
------------------------------------------------------------------------
[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