Problem Statement
What are anonymous functions or closures in PHP?
Explanation
Anonymous functions are functions without a name. They are used as arguments to other functions or stored in variables. Closures can access variables from their parent scope using the use keyword.
Code Solution
SolutionRead Only
$add = function($a,$b){ return $a+$b; }; echo $add(2,3);