note 68033 deleted from function.file by googleguy

From: Date: Tue, 22 Oct 2013 14:58:31 +0000
Subject: note 68033 deleted from function.file by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197258@lists.php.net to get a copy of this message
Note Submitter: richardtcunningham at gmail dot com ---- 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.

« previous php.notes (#197258) next »