|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-24 22:33 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 18:00:01 2025 UTC |
Description: ------------ Broken reset/next functionality after upgrading from PHP 4.4.0 to 4.4.1 when the array is passed from the global scope. The code below results in an infinite loop Reproduce code: --------------- <? $Buffer["key1"] = "value1"; Process(); function Process() { global $Buffer; for (reset($Buffer); $key=key($Buffer); next($Buffer)) { print "processing key: $key\n"; } print "done\n"; } ?> Expected result: ---------------- processing key: key1 done Actual result: -------------- processing key: key1 . . infinite loop . processing key: key1