Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65536 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17426 invoked from network); 31 Jan 2013 11:19:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2013 11:19:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=krebs.seb@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sebastian.krebs.berlin@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.172 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@gmail.com X-Host-Fingerprint: 74.125.82.172 mail-we0-f172.google.com Received: from [74.125.82.172] ([74.125.82.172:34459] helo=mail-we0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/D3-09318-6235A015 for ; Thu, 31 Jan 2013 06:19:03 -0500 Received: by mail-we0-f172.google.com with SMTP id x10so2033541wey.17 for ; Thu, 31 Jan 2013 03:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:x-google-sender-delegation :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=/z9ineMuuq60Tn1SYtAUTnoXDWnodM3xhP50L72LoGA=; b=qyHUPGw4LxqdImLH1JU6lmypw+qz4LtcpVT0OgjLI/I0ggJMoB0WDnW1TPiOe+Mr5u 8f0pUH7l8pStdQlnuHH99/cKJUfVYxFaVgzw+pglJrGbGJiEtXmHsVgFeel8QXMDQwHY Alazi8L7kmX7xgvLKFCP4p0ZdYC7/5GUZgpYxXB6jVe7gpWdyBDzmTZ2m4U8okoFPKkY LT9oQGPEtO0rjvngtfTDHrUtOXF2Xp89Ca/U1ZYcBfHSoXWBMcnoM6sCaVBHt47lVTZv 43ldxgkUvLYLwCsztyTKWkki9DRQNxp30ykAeVdzYbRGaCpvRbZspVLLHVV7mVlmKIgD rioQ== MIME-Version: 1.0 X-Received: by 10.194.238.226 with SMTP id vn2mr14605461wjc.23.1359631140365; Thu, 31 Jan 2013 03:19:00 -0800 (PST) Sender: sebastian.krebs.berlin@gmail.com X-Google-Sender-Delegation: sebastian.krebs.berlin@gmail.com Received: by 10.216.119.70 with HTTP; Thu, 31 Jan 2013 03:19:00 -0800 (PST) In-Reply-To: <510A4FB7.2080107@hoa-project.net> References: <510A3B71.7060508@hoa-project.net> <075AE850888292488D400D9632DFE6E102400AA5@DC01.aquacool.local> <510A4FB7.2080107@hoa-project.net> Date: Thu, 31 Jan 2013 12:19:00 +0100 X-Google-Sender-Auth: tSmNt3DEkhhfrnZLBWouIi7F3h8 Message-ID: To: "ivan.enderlin@hoa-project.net" Cc: PHP internals list Content-Type: multipart/alternative; boundary=089e01493c9825a51404d493cb23 Subject: Re: [PHP-DEV] Proposal: php://memory/ (& ://temp/) From: krebs.seb@gmail.com (Sebastian Krebs) --089e01493c9825a51404d493cb23 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2013/1/31 Ivan Enderlin @ Hoa > > On 31/01/13 12:00, Sebastian Krebs wrote: > >> 2013/1/31 Chris Wright >> >> I propose the following syntax: >>>> >>>> php://memory/ >>>> php://temp//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? >>> >>> >> >>> $fp =3D fopen('php://memory/foo', 'w+'); >>> >>> file_put_contents('php://**memory/foo', 'data'); >>> >>> rewind($fp); // would this be necessary? >>> >>> echo stream_get_contents($fp); // outputs 'data' >>> >>> >> Everything else wouldn't make much sense, because why else should you ne= ed >> to define an id for it? >> >> Bu whats about >> >> >> file_put_contents('php://**memory/foo', 'data'); >> $fp =3D fopen('php://memory/foo', 'w+'); >> >> 'file_put_contents()' closes the stream after writing. I would expect, >> that >> the engine will cleanup the memory (at least sooner or later), but then = I >> open it again. >> > Yup, I also expect the engine to clean memory when closing php://memory o= r > php://temp, but this is another proposal I think, no? > > > Additional why don't you just pass the open stream around, if you need t= o >> access it at multiple places? >> > Is this question for me or Chris? A question for everone :) > If it is for me, I don't want multiple accesses to the same > =93bucket=94/space, I want multiple =93buckets=94/spaces. So now I am confused: As far as I can see you can open as many memory- or temp-streams as you like. > > > 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/ > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 github.com/KingCrunch --089e01493c9825a51404d493cb23--