Anonymous functions with paramaters


$inherited = 123;
$func = function ($param) use ($inherited) {
return $param * $inherited;
};
print $func(2); // 246