note 76142 deleted from function.fopen by danbrown
| From: | danbrown@php.net | Date: | Mon, 08 Jun 2009 23:35:30 +0000 |
| Subject: | note 76142 deleted from function.fopen by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-156549@lists.php.net to get a copy of this message | ||
Note Submitter: Elliott Brueggeman
----
I did some basic performance testing of fopen() + fread() versus file_get_contents() when opening a
remote file for reading, and it looks like fread() is actually a little bit faster than fopen().
While it may be because of my GoDaddy hosting serverâs configuration, it makes me favor using
fopen() over file_get_contents(). Fopen() also has the added benefit of greater PHP version
compatibility.
Test results: http://www.ebrueggeman.com/php_benchmarking_fopen.php