Ants Aasma wrote:
+-0 on the foreach issue, but with the SPL Iterators I can see where Marcus is coming from.

Ok, I can see the reason behind it now as casting to array is not an option for objects with SPL Iterators. One little side-note: Programmers will still have to do an if($obj) check if they use $obj for just about anything but foreach.

After thinking it over you convinced me that treating null (and only null) like an empty array in foreach() might be a good idea, probably even for the non-SPL case.

- Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to