Re: RTFM code snippet
| From: | Andrey Hristov | Date: | Fri, 11 Jan 2002 15:22:57 +0000 |
| Subject: | Re: RTFM code snippet | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80203@lists.php.net to get a copy of this message | ||
If you have file with name "0" , with
while ($file = readdir($dir)) {
it will be casted to false, but this is regular file. Thus !== is used.
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
>
>