<?php $y = 1; $fn1 = fn($x) => $x + $y; // equivalent to using $y by value: $fn2 = function ($x) use ($y) { return $x + $y; }; var_export($fn1(3)); ?>