Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65528 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3212 invoked from network); 31 Jan 2013 09:38:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2013 09:38:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.12.24 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.12.24 host1.trois-doubles.net Linux 2.6 Received: from [95.130.12.24] ([95.130.12.24:38158] helo=host1.trois-doubles.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/11-09318-77B3A015 for ; Thu, 31 Jan 2013 04:38:01 -0500 Received: from Hwhost2.local (adsl-84-227-209-114.adslplus.ch [84.227.209.114]) by host1.trois-doubles.net (Postfix) with ESMTPSA id 4CDC320AC0D for ; Thu, 31 Jan 2013 10:37:56 +0100 (CET) Message-ID: <510A3B71.7060508@hoa-project.net> Date: Thu, 31 Jan 2013 10:37:53 +0100 Reply-To: ivan.enderlin@hoa-project.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Thunderbird/20.0a2 MIME-Version: 1.0 To: PHP Internals Content-Type: multipart/alternative; boundary="------------090704050903050008080802" Subject: Proposal: php://memory/ (& ://temp/) From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") --------------090704050903050008080802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi internals, The php://memory, and its respectful sibling php://temp, appear very=20 useful when we need to compute streams on-the-fly. They offer a lot of=20 services, like avoiding HDD accesses, increasing speed... and through a=20 straightforward API /=E0 la/ PHP, e.g. fopen('php://memory', 'r+').=20 However, we always work on the same "bucket"/space of data (per=20 runtime), which prevent us to use two different streams at a time. My=20 proposal is to allow access to many "buckets"/spaces to php://memory and = its sibling. I propose the following syntax: php://memory/ php://temp//maxmemory: We append / to the existing syntax. Thus, it would be possible to=20 work on php://memory/foo and php://memory/bar without collisions between = them. They would represent two distinct "buckets"/spaces. The implementation does not seem to require a ton of work, and the use=20 cases are numerous regarding the services offered by these wrappers. Thoughts? Best regards. --=20 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/ --------------090704050903050008080802--