It is one of these things that make perfect sense when you think about
it a little bit. Yes, it catches some people, just like strpos()
returning character position 0 on a first-char match catches some
people. There is no way to fix things like these without completely
breaking things. If we had strpos not use 0-based string positions or
if we arbitrarily broke references after loops, all sorts of other
things would start breaking and no longer make sense.
-Rasmus
Rasmus,
Thanks for your reply. With respect, this seems to be in a different
class from matching strings with character position 0, IMO.
What about unsetting the iterator before foreach() looping begins? The
iterator is altered anyway, so would this prevent it from being
"attached" to previous foreach() iterations?
Best,
Richard
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php