Posts marked with “SPL”
Introducing FilterIterators
Iterators over collections provide a clean separation of concerns. Filter Iterators are a great way to abstract the logic of your selecting sub-sets of Collections elements. by Mauro Chojrin
Education Station: Data Structures, Part One
I’ll admit, one of the best things I love about PHP is that I don’t have to deal with all sorts of different ways to deal with data. At the base of the language we have nice primitives like strings, integers, floats, and Booleans, and we also have one of the most flexible structures known to programmers—the PHP Array. The array itself wears many hats. If you are coming from other languages, you have to think about the structure of ordered data in a few different ways. The reason for this tends to deal mostly with how we need to represent data and how we manipulate data. Different data has different requirements.
Exporting Drupal Nodes with PHP and Drush
With Drupal, it’s possible to build very intricate solutions by gluing the right combination of contrib modules together. Of course, there is a downside to relying only on contrib modules, particularly for one-off or highly custom tasks. Bringing in a contrib module means you assume responsibility for feeding and caring for it. If it’s a […]
Iterators, ArrayAccess, & Countable – Oh My!
Last weekend, I gave a talk on SPL Iterators and Interfaces at MadisonPHP. Beth Tucker Long, our previous Editor in Chief, is one of the main organizers and showed how much she’s contributed to php[tek] (and the planning for php[world]) by putting on a truly excellent regional conference. It was great to see some of the other speakers I’d […]
A Simplified World Cup Draw Generator
If you’re a football fan, like I am, your anticipation for next year’s World Cup in Brazil is growing. This Friday, we will know the groupings for the 32 teams that will participate in the finals. I put together the (simplified) simulator shown in the gist below. Using PHP’s shuffle() function and SPL iterators, we […]
Meet Matthew Turland
Matthew is a veteran PHP programmer and a visible member of the PHP community.He has a new job, a new book and is speaking at TEK·X, life is good. Listen as we talk to Matthew about his session at TEK·X.
Missed Our SPL Webcast? View the Recording!
The recording for our New SPL Features in PHP 5.3, hosted by Blue Parabola’s Matthew Turland, is now available directly from our website.