note 20272 added to function.sizeof

From: Date: Thu, 28 Mar 2002 10:17:15 +0000
Subject: note 20272 added to function.sizeof
Groups: php.notes 
Request: Send a blank email to php-notes+get-28325@lists.php.net to get a copy of this message
Re: the hit count example Sure that will work because file() returns an array with the entire file contents and sizeof returns the number of items in any mixed type sent to it, in this case lines in the array. Each new log entry adds a line to the file and an entry to the file() array. But that's an incredibly inefficient way to do a hit counter. -- http://www.php.net/manual/en/function.sizeof.php http://master.php.net/manage/user-notes.php?action=edit+20272 http://master.php.net/manage/user-notes.php?action=delete+20272 http://master.php.net/manage/user-notes.php?action=reject+20272

« previous php.notes (#28325) next »