ID: 35491
User updated by: stephan dot skusa at lippe-net dot de
Reported By: stephan dot skusa at lippe-net dot de
Status: Bogus
Bug Type: Arrays related
Operating System: Linux
PHP Version: 4.4.1
New Comment:
I didn't found an equal bug description.
Not everybody describes a bug the same way, maybe that's the reason!
Previous Comments:
------------------------------------------------------------------------
[2005-11-30 15:14:12] [EMAIL PROTECTED]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
Reported a gazillion of times before.
Fixed long time ago.
------------------------------------------------------------------------
[2005-11-30 15:02:34] stephan dot skusa at lippe-net dot de
Description:
------------
The call of test() results into an endless loop. The first for() works
well, the for() in the function is the problem.
And the Problem appears even if the first for() is left out.
Reproduce code:
---------------
<?PHP
$arr = array ('a' => 1, 'c' => 2);
for (reset ($arr); $key = key ($arr); next ($arr)) {
echo $key;
}
echo "PING";
function test() {
global $arr;
for (reset ($arr); $key = key ($arr); next ($arr)) {
echo $key;
}
}
test();
?>
Expected result:
----------------
Output of "acPINGac"
Actual result:
--------------
Endless Loop
Output of "acPINGaaaaaaaaaaaaa ... to be continued"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35491&edit=1