Re: foreach with null
| From: | Jani Taskinen | Date: | Thu, 27 Oct 2005 10:12:43 +0000 |
| Subject: | Re: foreach with null | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19758@lists.php.net to get a copy of this message | ||
On Thu, 27 Oct 2005, Jochem Maas wrote:
advanced code should be checking vars properly before using them and, well, for any given foreach loop there is often enough an 'if (!count($array))'-like statement to take care of the 'empty' case. and in cases when speed is very important
..and where count() magically returns 1 f.e. for FALSE. :)
So really you can't rely on that. :)
--Jani