PhpStorm 2020.2 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.

See Strings ( for details.

Last modified: 08 May 2020