note 68033 added to function.file

From: Date: Tue, 11 Jul 2006 09:19:37 +0000
Subject: note 68033 added to function.file
Groups: php.notes 
Request: Send a blank email to php-notes+get-114661@lists.php.net to get a copy of this message
justin at visunet dot ie's note of 20-Mar-2003 states "Note: Now that file() is binary safe it is 'much' slower than it used to be. If you are planning to read large files it may be worth your while using fgets() instead of file()." I tested fgets(), file_get_contents(), and file() on PHP 4.3.2 and PHP 5 and timed each to be under a second with over 200,000 lines. I do not know if he was testing extremely long lines or what, but I could not duplicate the difference that he mentioned. ---- Server IP: 66.163.161.117 Probable Submitter: 222.126.68.236 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.file.php Edit -- http://master.php.net/note/edit/68033 Del: integrated -- http://master.php.net/note/delete/68033/integrated Del: useless -- http://master.php.net/note/delete/68033/useless Del: bad code -- http://master.php.net/note/delete/68033/bad+code Del: spam -- http://master.php.net/note/delete/68033/spam Del: non-english -- http://master.php.net/note/delete/68033/non-english Del: in docs -- http://master.php.net/note/delete/68033/in+docs Del: other reasons-- http://master.php.net/note/delete/68033 Reject -- http://master.php.net/note/reject/68033 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114661) next »