On Tue, 03 Aug 2004 00:11:09 -0400, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 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? >
Why are you looking for such low level functionality in what is essentially a scripting language? If you're this worried about speed, you should probably be writing this in C. Or make an extension to PHP. I know that you say "no non-standard extensions", but if you can't have an extension, you're not likely to have any major speed increases. > 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. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > !DSPAM:410f0edb54011976710829! > > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php