Re: RTFM code snippet

From: Date: Fri, 11 Jan 2002 15:09:45 +0000
Subject: Re: RTFM code snippet
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80202@lists.php.net to get a copy of this message
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" <php-l@bakednotfried.com> To: "php-general" <php-general@lists.php.net> 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#80202) next »