[PEPr] Comment on Streams::Stream_Iterate
| From: | Philippe Jausions | Date: | Tue, 11 Mar 2008 16:26:27 +0000 |
| Subject: | [PEPr] Comment on Streams::Stream_Iterate | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49372@lists.php.net to get a copy of this message | ||
Philippe Jausions (http://pear.php.net/user/jausions) has commented on the proposal for
Streams::Stream_Iterate.
Comment:
I used the stream wrapper with MDB2 and HTTP_Download to have less memory
footprint during the download of big data, i.e. you don't need to put all
the data in memory, format it then output it. The download starts sooner
too.
You could possibly also use it with copy() (PHP 5.3.0+), or fpassthru()
and all the stream-based functions (stream filters for instance.)
copy('foreach://value@data?callback=toString', '/path/to/file',
$context);
Bottom line, it allows you to view the transversable data as a stream.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=536
--
Sent by PEPr, the automatic proposal system at http://pear.php.net