note 12608 deleted from function.fgets by sniper
| From: | sniper@php.net | Date: | Sat, 03 Jan 2004 02:47:01 +0000 |
| Subject: | note 12608 deleted from function.fgets by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62838@lists.php.net to get a copy of this message | ||
Note Submitter: carlomitchell@hotmail.com
----
I would be very carefull in doing something like:
while(!feof($fp))
$buffer[] = chop(fgets($fp,filesize($filename)));
as this could take a very long time to process a larger file. I tried this with a file that was
about 650k and it took about a minute to read the file. When I replaced filesize($filename) with
4096 it only took 1 second...