Handles for multiple output buffers?
| From: | jtl_phpdotnet at spamex dot com | Date: | Tue, 03 Aug 2004 04:11:09 +0000 |
| Subject: | Handles for multiple output buffers? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-192518@lists.php.net to get a copy of this message | ||
Again, the internals list sent me to this forum for help.
In trying to create a series of parsers in PHP, using only PHP core and no non-standard add-ons, I
find myself emulating multiple character streams in a class that wraps the output buffer. Every
time I open a new stream, I first save the current contents of the output buffer and then reset the
stream. When the stream is closed, I then restore the output buffer to what it was before.
I'd like more conventional 3GL behavior, where I am permitted multiple buffered streams via
handles or stream objects. I see no way to do this with PHP as it stands. I also don't see
anyway to emulate this without worsening the problem by creating a profusion of strings.
I'm mostly able to work around the performance inefficiences of this wrapper-class approach by
making the application smart about when to use a new stream. But I'd rather have native
support.
When can I expect to see this kind of conventional stream behavior in PHP? Are there any workaround
I can use in the meantime?
Thanks for your help!
~joe
P.S. Again, because this listserv sends emails to me as if they originated from the person who made
the post, and because I'm now guarding my email address through spamex.com, I find that I am
unable to respond directly to this thread. My responses will likely appear in new a thread.