rfc:arrow_functions_v2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:arrow_functions_v2 [2019/03/14 09:24] – Clarify $this binding nikicrfc:arrow_functions_v2 [2019/04/15 14:52] nikic
Line 575: Line 575:
 <PHP> <PHP>
 $x = 1; $x = 1;
-$fn = () => $x++;+$fn = fn() => $x++;
 $fn(); $fn();
 var_dump($x); // By-value: 1 var_dump($x); // By-value: 1
rfc/arrow_functions_v2.txt · Last modified: 2020/08/01 23:53 by carusogabriel