Re: file seems b0rken
| From: | Thomas Wentzel | Date: | Tue, 09 Apr 2002 09:11:01 +0000 |
| Subject: | Re: file seems b0rken | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92201@lists.php.net to get a copy of this message | ||
Arhh man, that was embarrasing...
Thanks! I guess I didn't get enough coffee this morning :/
T.
Cc Zona wrote:
>
> In article <3CB292AC.48CBEA0@2m.dk>, tw@2m.dk (Thomas Wentzel) wrote:
>
> > $test=@file("some_non_existing_file");
> >
> > Can somebody explain why count($test) is 1. When $test doesn't hold any
> > data
>
> From <http://www.php.net/manual/en/function.count.php>:
>
> "If var is not an array, 1 will be returned"
>
> When file() failed to open your non-existing file, it returned false. False
> isn't an array, so count() returned 1.
>
> --
> CC