Re: readfile() memory usage

From: Date: Tue, 01 May 2012 00:37:37 +0000
Subject: Re: readfile() memory usage
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-60382@lists.php.net to get a copy of this message
Hi Larry, > 4) So given #2 and #3, the "readfile() will kill your memory, don't use it" > line is a persistent urban legend that belongs on Snopes as debunked. >  Looping on fread() for performance is a red herring. I implemented this earlier this very year to avoid memory issues (a quick look at project history shows me working on it in January). The difference between using readfile, and some convoluted method from the documentation comments was clear and immediate: corrupted download with out of memory error in the logs, to things working just fine. Let me re-create with a simple test script and share my server details before we call snopes :) paul

« previous php.internals (#60382) next »