由于混合使用int和字符串键,以下代码将无法编译:
function func(...$array) {}
func(...[ 'a' => 'A', 2 => 'B', 'c' => 'C' ]);
为什么抛出错误:Cannot use positional argument after named argument during unpacking?
请注意,我的问题不是:为什么抛出this错误?而是为什么给出这个特定的错误消息,对我来说,这似乎与实际原因(int和字符串键的混合)无关.