News Feed
Sections




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

SitePoint PHP Blog:
Using PHP Streams Effectively
November 21, 2013 @ 11:54:02

Vito Tardia has a new tutorial posted to the SitePoint PHP blog today showing you how to use PHP streams effectively, a continuation of his streams series started here.

n my previous article we've discovered the basics of PHP Streams and how powerful they were. In this tutorial we are going to use this power in the real world. First I'll show you how to build your custom filters and attach them to a stream, then we'll package our filters inside a document parser application.

He starts out by introducing the concept of filters in streams - bits of code that can be attached to the stream to perform operations on the data traveling through it. He includes a simple base64 encoding example with a fopen call to illustrate. He gets into more complex filtering by creating a Markdown filter capable of translating the incoming Markdown-formatted data into a document using the MarkdownExtra library. He also includes an example of another filter added on post-Markdown conversion, a Template filter using the RainTPL templating library.

0 comments voice your opinion now!
using streams filter markdown template tutorial

Link: http://www.sitepoint.com/using-php-streams-effectively/

blog comments powered by Disqus

Similar Posts

DevShed: Loading XML Strings with simpleXML in PHP 5

SitePoint PHP Blog: Social Network Authentication - Setup & Google+

ServerGrove Blog: Symfony2 components overview: Config

DZone.com: Video: PHP 5.3.1, MongoDB and Lithium on Windows 7 / IIS 7

SecWatch.org: CJ Tag Board Multiple Parameter Handling PHP Code Injection Vulnerabilities


Community Events

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


php7 release opinion conference library interview series api example language voicesoftheelephpant unittest version extension laravel laravel5 podcast introduction framework community

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