PHP gets closures. Rejoice!

This post is more than 15 years old.

Posted at 19:20 on 07 August 2008

I just noticed the other day that PHP 5.3 (now in alpha) has closures and lambdas. This is excellent news -- these are language features that can make for much more concise code. The syntax is a little bit more complex than in Ruby, JavaScript or C# thanks to the quirky way that PHP variables work, but it's nothing drastic, and it's a one-up on both Python and VB.NET, neither of which have multi-line lambdas.

The stable release of PHP 5.3 is due in September or October.