|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-02 20:43 UTC] tokul at users dot sourceforge dot net
[2005-11-02 20:47 UTC] derick@php.net
[2005-11-02 20:47 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 22:00:01 2025 UTC |
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