Re: Re: [lists.php] [PHP-DEV] Proposal: php://memory/<id> (& ://temp/<id>)
| From: | Ivan Enderlin @ Hoa | Date: | Thu, 31 Jan 2013 11:00:23 +0000 |
| Subject: | Re: Re: [lists.php] [PHP-DEV] Proposal: php://memory/<id> (& ://temp/<id>) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-65534@lists.php.net to get a copy of this message | ||
On 31/01/13 11:12, ALeX wrote:
Hi Ivan,It's not that hard to write such an function in php. (http://www.php.net/manual/en/function.stream-wrapper-register.php). Did I say it was hard? This is quite obvious to write such a wrapper, but PHP has php://memory. My proposal will save future work to users (and offer better performance because we stay in the PHP land).php://memory/<id> php://temp/<id>/maxmemory:<size>
I even once wrote an handler like "string://data-right-here" which allows to read (only) the "data-right-here" as a file. (I used it for a function which required a file and does not support strings directly, and instead of php://memory all data is freed when no longer used) Yes. I also have Hoa\Stringbuffer or some stuff like that. But, again, it will save future work to users.Best regards. -- Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/