The lambda anonymous function is part of PHP 5.3. What use does it have? Is there anything that one can only do with lambda? Is lambda better for certain tasks?
I\'
The implementation of the cryptic Y combinator?
function Y($F)
{
$func = function ($f) { return $f($f); };
return $func(function ($f) use($F)
{
return $F(function ($x) use($f)
{
$ff = $f($f);
return $ff($x);
});
});
}
Cited Source: http://fabien.potencier.org/article/17/on-php-5-3-lambda-functions-and-closures