News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mike Naberezny's Blog:
PHP Temporary Streams
October 20, 2008 @ 07:52:59

Following up on this post from David Sklar, Mike Naberezny has come up with a few methods of his own to come up with his "thousand string concatenations".

It's been a while since David Sklar called out to let a thousand string concatenations bloom. That discussion produced some entertaining suggestions for putting strings together such as using preg_replace and calling out to MySQL with SELECT CONCAT.

Mike goes with a bit different media of choice - the filesystem functions and streams. One example opens a file, writes to the file then rewinds back to the beginning of the stream. He modified this to make it slightly more useful (writing to memory not the file system) and shows how it could be used to make a temporary stream for testing purposes.

0 comments voice your opinion now!
temporary stream concatenation zendlog filesystem


blog comments powered by Disqus

Similar Posts

Gonzalo Ayuso's Blog: How to use eval() without using eval() in PHP

Lars Tesmer's Blog: How to Unit Test a Class Making Calls to an URL (or the Filesystem) With PHPUnit

Raphael Stolt's Blog: Logging to MongoDb and accessing log collections with Zend_Tool

ZendCasts.com: Reporting with Zend_Tool and Zend_Log

PHP-Coding-Practices.com: Composing Methods: Replace Temp With Query


Community Events





Don't see your event here?
Let us know!


unittest symfony2 developer install api laravel introduction series release list refactor testing framework podcast language threedevsandamaybe community opinion interview code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework