I'm not sure if a resource casted to numeric to be 0 - var_dump() to say :(0) resource
of type
!==flase assures that it is FALSE, not 0.
!== is like != but makes type checking. Frequently used with strpos(). See the memos
there.
There is also available === operator. It is like == but also makes type comparison.
Regards,
Andrey Hristov
- Original Message -
From: mike cullerton [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Friday, January 11, 2002 5:01 PM
Subject: [PHP] RTFM code snippet
hey folks, hope the new year is treating everyone well.
i was RTFMing yesterday and ran across this piece of code
while (false !== ($file = readdir($handle))) {
which is similar to stuff i've done
while ($file = readdir($dir)) {
so, what am i not catching with my code, and what is really going on in the
RTFM code with the false !== part?
thanks y'all,
mike
-- mike cullerton
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]