Lines Matching refs:var
15 // Closing over $var
16 $var = 4;
17 $foo = fn() => $var;
20 // Not closing over $var, it's a parameter
21 $foo = fn($var) => $var;
24 // Close over $var by-value, not by-reference
25 $var = 5;
26 $foo = fn() => ++$var;
28 var_dump($var);
31 $var = 6;
32 var_dump((fn() => fn() => $var)()());
33 var_dump((fn() => function() use($var) { return $var; })()());