You are here: Re: Array pointer for internal(?) functions « PHP Programming Language « IT news, forums, messages
Re: Array pointer for internal(?) functions

Posted by Chung Leong on 01/12/06 09:48

André Hänsel wrote:
> 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.

I should add that there is a real bug in PHP 4.4.1 that causes infinite
loop, shown in the following example.

<?

$array = array(1, 2, 3);

function loop(&$array) {
while(($key = key($array)) !== null) {
echo "Hello $key<br>";
next($array);
}
}

loop($array);

?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация