Re: file seems b0rken

From: Date: Tue, 09 Apr 2002 08:23:08 +0000
Subject: Re: file seems b0rken
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-92195@lists.php.net to get a copy of this message
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

« previous php.general (#92195) next »