PhpStorm 2019.3 Help

Code Inspection: Illegal string offset

Reports the usages of string indexes that are not of the integer type.

As of PHP 5.4, string offsets have to either be integers or integer-like strings. Since it's considered bad practice to use strings as a string index, the inspection reports them, as well.

Reports the usages of string indexes that are not of the integer type.

See Strings (php.net) for details.

Last modified: 20 February 2020