News Feed
Sections




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

ProDevTips Blog:
Fluent Arrays and Strings in PHP
June 23, 2008 @ 07:57:18

On the ProDevTips blog, Henrik has written up an extensive tutorial with plenty of code examples on working with something inspired by a few other languages - fluent arrays and strings.

I've been working some with jQuery and Ruby lately, as you might know they both have very neat fluent interfaces for writing short and easily understandable code. Especially Ruby's array and string handling should be something that can be done in PHP so I started googling. [...] It's probably very possible that what I'm looking for is already part of some PHP framework or such but I didn't want to spend more time looking than being productive.

Based on some Ruby examples, he defines a set of functions that can be use to create these fluent interfaces to the common PHP variable types (contained in a class for easy use). The entire source can be downloded here.

0 comments voice your opinion now!
fluent string array class source download tutorial


blog comments powered by Disqus

Similar Posts

SitePoint.com: How To Handle File Uploads With PHP

Charlie Key's Blog: Transmitting data between Flex and PHP using JSON

Nick Halstead's Blog: 10 Reasons why PHP is still very much alive

TrueLogic.org: Integrate the Mailchimp API with your PHP application

Nate Turner: Spinning Up Symfony 2 Development Environments With Vagrant


Community Events

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


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

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