You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// echo $fun; //this will return error that obj cant be convert into string. but $fun is fn. how it is object? it is obj is default php class closure. it will automatically marked as object of default php closure class.
$joy = function ($a, $b, Closure $callback) {
$m = $a * $b;
return $callback($m);
};
echo $joy(20, 5, $fun);
// var_dump($joy); //this is also object of closure class. bcz $joy is ananymous fun().