I came across this as part of some Laravel PHP code on YouTube. It does work, it's on a fresh install of vanilla Laravel 6, and the instructor appears to be using PHPStorm IDE:
dd( ...vars: $paymentGateway->charge( amount:2500));
I am aware of the splat operator, but this appears to be taking it a step further. I have looked everywhere and cannot find an explanation for ...vars: $whatever
as an argument (or as anything else, for that matter). I don't understand how vars
is not prepended with $
and the :
that comes after.
UPDATE: The instructor answered my question. This is PHPStorm specific syntax. More information can be found here: https://www.jetbrains.com/help/webstorm/viewing-method-parameter-information.html