Arrow functions in PHP
Arrow Functions with PHP
Arrow functions are similar to anonymous function, but they have a more concise syntax and limited usage.
Another difference between anonymous and the arrow function, is that the arrow function has visibility on the βexternalβ scope. In the next example, 2 variables, $a
and $b
are declared and initialized outside the arrow function, and are used in the expression of the arrow function.