PHP 8.1. I declared a method with this signature:
public static function if(mixed $condition, mixed $subject = null, \Closure $callback)
And called it with this call:
CLASS::if(condition: is_numeric(...), callback: do_something(...));
Yet I still got this exception:
ArgumentCountError: CLASS::if(): Argument #2 ($subject) not passed
Why? $subject clearly is set to default to null.