RE: [PHP] String to Stream

From: Date: Fri, 05 Aug 2005 18:40:41 +0000
Subject: RE: [PHP] String to Stream
Groups: php.general 
Request: Send a blank email to php-general+get-220091@lists.php.net to get a copy of this message
[snip] Again, I would like to treat the string as a stream. One possible way to accomplish this would be to simply write the string to a temporary file, open the file with fopen and then use fscanf, fseek, etc. to process the text. However, I am assuming there is an easier way (i.e. a method without the file io overhead) to be able to treat the string as a stream. [/snip] Treating a string as a stream (the most common thing is to convert a stream to a string and work with the string using the string functions I showed you or writing custom functions) is going to incur additioanl overhead. What, exactly, do you want to accomplish? Can you give an example?

« previous php.general (#220091) next »