php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60810 Persistent streams
Submitted: 2012-01-19 19:06 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: boen dot robot at gmail dot com Assigned:
Status: Open Package: Streams related
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
25 - 16 = ?
Subscribe to this entry?

 
 [2012-01-19 19:06 UTC] boen dot robot at gmail dot com
Description:
------------
It would be really useful (performance wise) for many kinds of streams (particularly php://memory and php://temp streams) to be persistent, or more precisely, to have the option to be persistent.

In the case of php://memory and php://temp, I realize there's Wincache and APC for that, but I'm talking about this not requiring an extension, plus, is available for other kinds of streams (http, ftp, etc.) too.

To avoid any BC breaks, I suggest a new function, let's say pfopen(), that will be equivalent to fopen(), except that its first argument will be a persistent ID (to allow multiple persistent handles to the same resource/connection), and it will reuse a stream if one is already created within the current PHP process.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 19:01:23 2020 UTC