2017-10-10 44 views
0

我安裝了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配置?

回答

相關問題