Re: Handles for multiple output buffers?

From: Date: Tue, 03 Aug 2004 07:18:43 +0000
Subject: Re: Handles for multiple output buffers?
Groups: php.general 
Request: Send a blank email to php-general+get-192525@lists.php.net to get a copy of this message
* Thus wrote jtl_phpdotnet@spamex.com: > 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. > You may be seeking: http://php.net/stream-wrapper-register With the example listed, you can have as many buffers as you please. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

« previous php.general (#192525) next »