InvalidArrayOffset
An array is accessed with a key of the wrong type.
Example
Section titled “Example”<?php/** @param array<string, int> $map */function get(array $map): int { return $map[0]; // int key used on string-keyed array}How to fix
Section titled “How to fix”Use the correct key type as declared in the array’s type annotation.