News Feed
Jobs Feed
Sections




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

Kevin Schroeder's Blog:
You want to do WHAT with PHP? Chapter 5
September 03, 2010 @ 11:14:58

Kevin Schroeder has the latest excerpt from his book posted ("You Want to Do WHAT with PHP?") with a focus on the SPL - Standard PHP Library. He specifically takes a quick look at Iterators.

If you are doing any data processing whatsoever you are using arrays. And most likely you are doing database queries, iterating over the results and doing your algorithm-ing. But what if you have additional functionality that you need to have integrated with your data. You could go the traditional route and copy and paste half your application around or you could build, what we like to call structured applications. SPL allows you to do that.

In the excerpt he mentions the methods that come built in to Iterators like rewind, current and valid. There's also some sample code showing a custom iterator that works with some user data to output the information set in the constructor. You can find out more about this chapter and the rest in Kevin's book.

3 comments voice your opinion now!
book excerpt kevinschroeder iterator spl standard library


blog comments powered by Disqus

Similar Posts

NETTUTS.com: Image Resizing Made Easy with PHP

PHPClasses.org: Book Review - PHP 5 CMS Framework Development - 2nd edition (Packt)

Codewalkers.com: Booke Review - Pro PHP XML and Web Services

Richard Davey\'s Blog: The Zend Study Guide Book Review

Andi Gutmans' Blog: PHP 5 Power Programming passes 1 Million downloads!


Community Events











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


overview framework facebook unittest example language symfony2 hack install package introduction component podcast release composer code security hhvm application opinion

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