News Feed
Sections




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

Sameer Borate's Blog:
Anonymous functions in PHP
June 07, 2010 @ 12:42:33

On his blog today Sameer Borate has a new post talking about anonymous functions (closures, lambdas) in PHP and includes plenty of examples of how to use them.

Anonymous functions are common in various modern languages, Ruby and Javascript being the popular one. But until version 5.3 PHP lacked true anonymous functions. Although newbie programmers are hard-pressed to find a suitable application for anonymous functions, they are indispensable if you do a lot of OOP, and can provide some elegant solutions to some particular problems.

He starts with a look at variable functions both in procedural code an object-oriented then moves to the anonymous/lambda function examples (with some nexting involved) and a few uses for closures.

0 comments voice your opinion now!
anonymous function closure lambda tutorial


blog comments powered by Disqus

Similar Posts

Chris Risner: Mobile Geolocation Apps with Windows Azure Websites Part 1: The PHP Code

NETTUTS.com: Increase Productivity by Creating PHP Helper Functions

Arnold Daniels' Blog: How I PHP: The Output Handler

DevShed: Building a Data Validation System with the Prototype Pattern with PHP 5

O'Reilly: Migrating Web-Based PHP Applications to Ajax


Community Events

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


project framework example api laravel composer community configure list symfony language part2 yii2 podcast php7 introduction interview application opinion series

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