There is a difference between a closure and a lambda. PHP's create_function() implemented lambdas in PHP version 4.0.1 which was released in June 2000. 5.3 added closures.
The key thing with a lambda in python is that it is defined at the usage site.
so you can do:
filter(lambda x: x > 42, mylist)
Whereas in php that would be: $mylambda = create_function('$x','return $x > 42;');
filter($mylambda, $mylist);
Yes, the usage strings as code adds yet another level of WTF to this example.Note that php.net/create_function even points you to their page on actual anonymous functions, which they erroneously claim are the same as closures.