Convert any callable into Closure object to be returned and then used/called when needed. The next syntax (aka First class callable syntax) of $this->methodName(...)
is identical in behavior as current: Closure::fromCallable([this, 'methodName'])
. Do not confuse this syntax to unpacking argument syntax of ...$args
.
function calls
PHP 7.3 Trailing commas in function calls
The ability to have a trailing comma in arrays is already built-in, so why not have it extended to function/method parameters?