Posted by Andrι Hδnsel on 01/12/06 04:45
Hi!
This:
function foo()
{
$a = array('a' => 'b', 'c' => 'd');
return array_keys($a);
}
while ($a = each(foo()))
{
echo 'dummy';
}
produces an infinite loop. Probably since the result of array_key doesn't
support an array pointer or so, I don't know how this is internally
implemented.
Shouldn't this be considered as a bug? Shouldn't be the resulst of array_key
walkable with each?
Regards,
Andrι
[Back to original message]
|