Feature request
Split from #5368
Example: https://3v4l.org/A2MGD
var_dump(call_user_func_array('array_merge', ['foo' => ['bar' => 2]]));
Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in /in/A2MGD:3
Stack trace:
#0 /in/A2MGD(3): array_merge(foo: Array)
#1 {main}
We need rules for call_user_func and call_user_func_array and the functions/methods they call.
Playground example: https://phpstan.org/r/89ee6acd-0ba3-4712-b509-10eb43789518
PHPStan actually reports the array with named arguments as invalid.
Feature request
Split from #5368
Example: https://3v4l.org/A2MGD
We need rules for call_user_func and call_user_func_array and the functions/methods they call.
Playground example: https://phpstan.org/r/89ee6acd-0ba3-4712-b509-10eb43789518
PHPStan actually reports the array with named arguments as invalid.
array<string, array<string, int>>(see call_user_func_array support named arguments phpstan-src#755)