Array and string offset access syntax with curly braces is deprecated 在网上查到一篇文章说{}获取字符串的方法在7.4已经丢弃了,在7.4中必须是有[]来获取。 $str = $string[1]; 原文链接