News Feed
Sections




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

Dagfinn Reiersol's Blog:
Real programming with PHP 5.3 (part 2) JavaScript-style classes
April 01, 2009 @ 12:07:03

On t Dagfinn Reiersol'sblog, there's a new post that's the second part of a series on "real programming" with the upcoming PHP 5.3 release.

In part one of this series, we looked at the ability to use lambda functions or closures to process arrays. In this part, we will see how closures can be used to build classes in a completely new way. After I did my own research, I discovered that someone had beat me to it.

He compares the two approaches - one defining closures in the constructor, the other as they're needed - and some code showing the creation and use of the lambda functions (using __call and call_user_func_array to catch those requests).

0 comments voice your opinion now!
programming php5 javascript style class lambda closure


blog comments powered by Disqus

Similar Posts

Andrei Zmievski's Blog: All the Little Pieces, or TextIterator in PHP 6

Dallas PHP Users Group: Book Review - Beginning Web Programming with HTML, XHTML and CSS

Nick Halstead's Blog: Programming Tips #7 & #8

Matthew Weier O'Phinney's Blog: A Primer for PHP 5.3's New Language Features

PHPBuilder.com: Using XML - A PHP Developer\'s Primer (Part 4) - XML-RPC, PHP and Javascript


Community Events





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


conference developer voicesoftheelephpant tips podcast laravel interview zendserver community framework api symfony language series introduction deployment list library bugfix release

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