Which one would u use & why?
also, u see any improvements on this code, or is it okay?
8 Replies
Definitely B, there's no need to use
call_user_func
anymore
I'd also opt for $data instanceof Closure
instead of is_callable($data)
oh, okay. why though?
You could also simplify to:
Callables are more than Closures though
But the function only accepts a
Closure
or array
Well, it that case you are right π
i did a fast lookup on vendor/filament and search for
call_user_func
& also fir is_callable
in my case havent found results
but if i do search for instanceof Closure
i do get results
yeah ill follow
yeah cool ill stick to this
ty y'all for the feedback!No problem!