Short Closures in PHP
Bob Weinand created a new RFC that describes how the anonymous functions could be less verbose.
This function
function ($x) {
return $x * 2;
}
could be written as one of the following
$x ~> $x * 2
$x ~> { return $x * 2;}
($x) ~> $x * 2
($x) ~> { return $x * 2; }
If it gets accepted it'll probably be added in PHP 7.1.