News Feed
Sections




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

IBM developerWorks:
What's new in PHP V5.3, Part 2 Closures and lambda functions
December 11, 2008 @ 08:49:51

IBM developerWorks has posted part two of their look at new features included in the upcoming PHP 5.3 release. This part looks specifically at closures and lambda functions.

Follow along in this "What's new in PHP V5.3" series of articles that covers the new and exciting features found in PHP V5.3, which will be released by the end of 2008. Part 1 looks at the changes made to the object-oriented programming and object handling in PHP V5.3. Here in Part 2, we look at closures and lambda functions. They are designed to make programming much easier by allowing you to easily define throwaway functions that can be used in many contexts.

Lambda functions (or as they describe them "throwaway functions") are ones created dynamically as the script runs, possibly as a callback to one of the many PHP functions that allow for one. It removes the need for a call to create_function. Closures let you assign a function to a variable/return value, including variables to use, and call it later.

They also look at closures and objects, using reflection on them and some reasoning on why you should use closures in your future applications.

0 comments voice your opinion now!
php5 new closure lambda function series


blog comments powered by Disqus

Similar Posts

Paul Jones' Blog: Solar 0.26.0 Released, and New Website

Kian Hui Teo\'s Blog: Switching between PHP 5.1.x and Zend Core for Oracle

Vexxhost.com: Top 5 new (and cool!) features in PHP5 that you probably haven't heard of

Richard Lord's Blog: PHP 5.2 - Nesting level too deep - recursive dependency?

PHPFive.net: Creating a dynamic Google sitemap using the PHP5 SimpleXML extension


Community Events





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


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

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