Re: Re: Iterator Class/foreach Logic Flaw? (was: Cannot use foreach() with $this

php.internals

Marc Dembogurski

22 years ago
>> >> You mean that the hasMore is being used just to >> assure the current position is valid. While it
should
>> be only used to confirm if there are more elements
or
>> not. Right? >> >Absolutely. To avoid lots of confusion/bug reports, >the current hasMore() should be renamed to isValid().
You are right. It WILL cause confusion if not renamed. __________________________________ Do you Yahoo!? Yahoo! Search - Find what you?re looking for faster http://search.yahoo.com