News Feed
Jobs Feed
Sections




News Archive
Timothy Boronczyk's Blog:
Anonymous Functions and Closures
March 10, 2009 @ 12:57:08

Timothy Boronczyk has written up a new blog post about two of the features he's most excited about in the upcoming PHP 5.3 release - anonymous functions and closures.

As of version 5.3, PHP will offer better support for anonymous functions and a new syntax which supports closures. [...] Anonymous functions are functions that are defined without being bound to a proper name. Typically, anonymous functions are used only a limited number of times and for a specific purpose; you could think of them as "throw-away" functions if you'd like.

He includes some code examples showing how the anonymous functions can replace the current create_function method and how closures can effectively import variable values into the current scope just like they were passed in.

0 comments voice your opinion now!
php5 closure anonymous function example


blog comments powered by Disqus

Similar Posts

PHP.net: PHP 5.3.0 Released!

Nexen.net: PHP Statistics for July 2007

Vance Lucas' Blog: Practical Uses for PHP 5.3 Closures

Developer Tutorials Blog: SimpleTest: Unit Testing for PHP

DevShed: A Quick Overview of the XML DOM Extension in PHP 5


Community Events











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


podcast community series functional conference introduction zendframework2 database symfony2 opinion rest unittest release framework usergroup development language interview phpunit testing

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