PhpStorm 2019.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 (php.net) for details.

Last modified: 23 August 2019