Anonymous Functions in PHP
Anonymous are functions that do not have a name. Such functions can be written as variable values.
Let's see how this is done.
Let's create an anonymous function and assign
it to the variable $func:
<?php
$func = function()
{
return '!!!';
};
?>
Let's now call our function. To do this, write the variable name and put parentheses after it:
<?php
echo $func();
?>
Make an anonymous function, that will take two numbers as parameters, and return their sum.