In once
, should call_user_func_array
, instead of call_user_func
#71
goodevilgenius
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since the arguments passed to the function are also passed to the callback, it would be useful if they were passed as-is.
So, I could write code like this:
Otherwise, I have to first destructure the array that's passed into the callback, or specifically enclose the values.
And destructuring can have issues with optional arguments, since something like this wouldn't work if the second parameter isn't passed:
Currently, my best option is to do this:
Or, this, which seems to be the preferred method, based on the documentation:
Beta Was this translation helpful? Give feedback.
All reactions