[PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Ivan Enderlin @ Hoa
Hi internals, The php://memory, and its respectful sibling php://temp, appear very useful when we need to compute streams on-the-fly. They offer a lot of services, like avoiding HDD accesses, increasing speed... and through a straightforward API /à la/ PHP, e.g. fopen('php://memory', 'r+').

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Attila Bukor
Hi Ivan, I've never actually worked with them, but it seems nice. However, we should make redirect php://memory and php://temp to php://memory/default and php://temp/default respectively to avoid break stuff imho. Cheers, r1pp3rj4ck On Thu, Jan 31, 2013 at 10:37 AM, Ivan Enderlin @ Hoa

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 11:00, Attila Bukor wrote: Hi Ivan, Hi Attila, I've never actually worked with them, but it seems nice. However, we should make redirect php://memory and php://temp to php://memory/default and php://temp/default respectively to avoid break stuff imho. Obviously yes! Sorry, I miss

[PHP-DEV] Re: [lists.php] [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread ALeX
Hi Ivan, php://memory/id php://temp/id/maxmemory:size It's not that hard to write such an function in php. (http://www.php.net/manual/en/function.stream-wrapper-register.php). I even once wrote an handler like string://data-right-here which allows to read (only) the data-right-here as

RE: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Chris Wright
I propose the following syntax: php://memory/id php://temp/id/maxmemory:size I would very much like to see this as well. Would this also allow you to open multiple pointers to the same bucket? For example would this work? ?php $fp = fopen('php://memory/foo', 'w+');

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Sebastian Krebs
2013/1/31 Chris Wright chr...@aquacool.ltd.uk I propose the following syntax: php://memory/id php://temp/id/maxmemory:size I would very much like to see this as well. Would this also allow you to open multiple pointers to the same bucket? For example would this work? ?php

Re: [PHP-DEV] Re: [lists.php] [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 11:12, ALeX wrote: Hi Ivan, php://memory/id php://temp/id/maxmemory:size 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

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 12:00, Sebastian Krebs wrote: 2013/1/31 Chris Wright chr...@aquacool.ltd.uk I propose the following syntax: php://memory/id php://temp/id/maxmemory:size I would very much like to see this as well. Would this also allow you to open multiple pointers to the same bucket?

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Sebastian Krebs
2013/1/31 Ivan Enderlin @ Hoa ivan.ender...@hoa-project.net On 31/01/13 12:00, Sebastian Krebs wrote: 2013/1/31 Chris Wright chr...@aquacool.ltd.uk I propose the following syntax: php://memory/id php://temp/id/maxmemory:**size I would very much like to see this as well.

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Gustavo Lopes
On Thu, 31 Jan 2013 10:37:53 +0100, Ivan Enderlin @ Hoa ivan.ender...@hoa-project.net wrote: The php://memory, and its respectful sibling php://temp, appear very useful when we need to compute streams on-the-fly. They offer a lot of services, like avoiding HDD accesses, increasing speed...

RE: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Chris Wright
On 31/01/13 12:00, Sebastian Krebs wrote: 2013/1/31 Chris Wright chr...@aquacool.ltd.uk I propose the following syntax: php://memory/id php://temp/id/maxmemory:size I would very much like to see this as well. Would this also allow you to open multiple pointers to the same

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 12:18, Gustavo Lopes wrote: On Thu, 31 Jan 2013 10:37:53 +0100, Ivan Enderlin @ Hoa ivan.ender...@hoa-project.net wrote: The php://memory, and its respectful sibling php://temp, appear very useful when we need to compute streams on-the-fly. They offer a lot of services, like

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Gustavo Lopes
On Thu, 31 Jan 2013 14:55:26 +0100, Ivan Enderlin @ Hoa ivan.ender...@hoa-project.net wrote: I'm not sure what you mean here. Each time you open a php://memory stream, you're working on a new bucket, right? Yes exact. My bad. But my proposal still persist. Identifying php://memory buckets

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 15:35, Gustavo Lopes wrote: On Thu, 31 Jan 2013 14:55:26 +0100, Ivan Enderlin @ Hoa ivan.ender...@hoa-project.net wrote: I'm not sure what you mean here. Each time you open a php://memory stream, you're working on a new bucket, right? Yes exact. My bad. But my proposal still