PHP 7.4 的 Array and string offset access syntax with curly braces is deprecated 的错误和解决方法

分类:PHP相关 时间:2023-11-07 11:42 浏览:0 评论:0
0

PHP 升级到 7.4 之后,会收到 Array and string offset access syntax with curly braces is deprecated 的错误,这是因为:

PHP7.4 不再支持使用大括号访问数组以及字符串的偏移,就是不支持数组{}写法,统一为数组[]

比如:

$index{$start+7}

就要改成:

$index[$start+7]

生成海报 分享 打赏作者
1. 本站所有资源来源于用户上传或网络,仅作为参考研究使用,如有侵权请邮件联系站长!
2. 本站积分货币获取途径以及用途的解读,想在本站混的好,请务必认真阅读!
3. 本站强烈打击盗版/破解等有损他人权益和违法作为,请各位会员支持正版!
4. PHP相关 > PHP 7.4 的 Array and string offset access syntax with curly braces is deprecated 的错误和解决方法

用户评论