News Feed
Sections




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

Shameer's Blog:
PHP 5.3 Practical look into Lambda functions and closures
December 30, 2010 @ 11:11:26

For those out there still coming to grips with some of what PHP 5.3 has to offer, I'd suggest checking out this new article from Shameer about using lambdas and closures along with some examples putting them into action.

PHP 5.3 packaged the power of functional programming by adding support for lambda functions and closures. You will be familiar with them in javascript. In this article we will have a look into these features and its usages.

He starts with explanations of what they are with simple code examples showing their use - a lambda assigned to a variable and closures with the "use" keyword. He shows how they can be used in application prototyping, making handy callback functions and includes a practical example of finding the factorial of a number using a lambda.

2 comments voice your opinion now!
lambda closure tutorial practical example


blog comments powered by Disqus

Similar Posts

Padraic Brady's Blog: Example Zend Framework Blog Application Tutorial: Parts 1-8 Revisited

Ian Christian's Blog: Handling Uploaded file in symfony’s admin generator

Nefarious Designs: Object-Oriented PHP Part 2: Relationships

Godaddyhostingreview Blog: How to move Magento from Production to Live Server

Expert Developer: Install PHP CodeSniffer on Windows Machine


Community Events





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


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

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