PhpStorm IDE 2017.2不会在PHP 7.1.x中突出显示“[]运算符不支持字符串”错误
问题描述:
我安装了PhpStorm版本2017.2并配置了PHP 7.1在下设置>语言和框架> PHP> PHP语言级别PhpStorm IDE 2017.2不会在PHP 7.1.x中突出显示“[]运算符不支持字符串”错误
不幸的是使用的字符串变量(说明:http://php.net/manual/de/migration71.incompatible.php#migration71.incompatible.empty-string-index-operator)空数组索引运算符时,它不突出可能出现的错误
代码:
<?php
$test = 'a string';
$test[] = 'an array value';
echo "it works";
当用PHP 7.1.x执行代码时,会发生以下错误:
Fatal error: Uncaught Error: [] operator not supported for strings in
所以代码肯定不起作用。
任何人都可以帮助我与PhpStorm配置?
非常感谢您的回复。没有更多的答案需要。 – Remluben