Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5480 invoked from network); 31 Jan 2013 10:00:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2013 10:00:17 -0000 Authentication-Results: pb1.pair.com header.from=attila.bukor@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=attila.bukor@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.182 as permitted sender) X-PHP-List-Original-Sender: attila.bukor@gmail.com X-Host-Fingerprint: 209.85.210.182 mail-ia0-f182.google.com Received: from [209.85.210.182] ([209.85.210.182:47870] helo=mail-ia0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/71-09318-9A04A015 for ; Thu, 31 Jan 2013 05:00:14 -0500 Received: by mail-ia0-f182.google.com with SMTP id w33so3633692iag.41 for ; Thu, 31 Jan 2013 02:00:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=8vPAMkUjtZT+IfI4f6NUM2Ep7hBF9KtmklybVKKE1yM=; b=H7uh2Dz32+rdPwbJX98TtrpPTQkRWe9DaM9KUQiDmfT5siVNBkIJfeyLZ9AIF2kUFh 6OHk53cKKp22fEXzfbs4SVmNDzdQv3IHsWQX7XWjWNpvDOBi4kgBtsFUtDo742ETmZ6B pbhWBg51gPpqLWlW0+EP9X3bxEfWVUYhSOENlTZqHw6rE8JWcWOLm2CHSjoxpWKJmys8 NkL2H5/Mxpl//TO9cJ1r1De73AF19NBEcdMXw9aBv9VkpgGQTafYhuy8T0Pzh/kRG9y4 m1ne/UpufRoFE+a6doOImD/0ogu30uImlMyKiV3oAHr8Cv/d8vAtqRp7r4GkmLOyF+K4 Cp+g== MIME-Version: 1.0 X-Received: by 10.50.150.174 with SMTP id uj14mr598046igb.19.1359626402254; Thu, 31 Jan 2013 02:00:02 -0800 (PST) Received: by 10.64.124.101 with HTTP; Thu, 31 Jan 2013 02:00:02 -0800 (PST) In-Reply-To: <510A3B71.7060508@hoa-project.net> References: <510A3B71.7060508@hoa-project.net> Date: Thu, 31 Jan 2013 11:00:02 +0100 Message-ID: To: ivan.enderlin@hoa-project.net Cc: PHP Internals Content-Type: multipart/alternative; boundary=f46d043d644bbbcf7304d492b045 Subject: Re: [PHP-DEV] Proposal: php://memory/ (& ://temp/) From: attila.bukor@gmail.com (Attila Bukor) --f46d043d644bbbcf7304d492b045 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 < ivan.enderlin@hoa-project.net> wrote: > 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 /=E0 la/ PHP, e.g. fopen('php://memory', 'r+'). Howev= er, > we always work on the same "bucket"/space of data (per runtime), which > prevent us to use two different streams at a time. My proposal is to allo= w > access to many "buckets"/spaces to php://memory and its sibling. > > I propose the following syntax: > > php://memory/ > php://temp//maxmemory:<**size> > > We append / to the existing syntax. Thus, it would be possible to wor= k > 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 > cases are numerous regarding the services offered by these wrappers. > > Thoughts? > 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/ > > --f46d043d644bbbcf7304d492b045--