[small rant]
This morning's thread on strpos() brings up an interesting point, zero
has a context.

In certain cases 0 is the equivalent of FALSE and in other cases a 0 is
just a 0. In the context of strpos() 0 indicates that the needle is in
the first position of the haystack. If the needle is not found in the
haystack a Boolean FALSE is returned. In this case 0 is not the
equivalent of FALSE.

There are other cases, most of them specific to strings, in which 0 is
not the equivalent of FALSE. Newbies to PHP or certain functions will no
doubt encounter these cases at some point.

Exercise care when using 0 to determine if something is FALSE and
understand that 0 has context.
[/small rant]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to