Hi internals,

Motivated by the recent list comprehensions RFC, I think it's time we took
another look at short closures:

https://wiki.php.net/rfc/arrow_functions_v2

This is based on a previous (withdrawn) proposal by Levi & Bob. It uses the
syntax

    fn($x) => $x * $multiplier

and implicit by-value variable binding. This example is roughly equivalent
to:

    function($x) use($multiplier) { return $x * $multiplier; }

The RFC contains a detailed discussion of syntax choices and binding modes.

Regards,
Nikita

Reply via email to