当前位置:网站首页>Array and string offset access syntax with curly braces is no longer support

Array and string offset access syntax with curly braces is no longer support

2022-06-22 23:21:00 Juqi

PHP7.4 Curly braces can no longer be used to access the offset of an array or string . Need to put {} Modified into [] You can solve the problem

If the code logic contains similar

  $asc = ord($s{0}) * 256 + ord($s{1}) - 65536;
Need to be modified to

$asc = ord($s[0]) * 256 + ord($s[1]) - 65536;


Link to the original text :https://blog.csdn.net/sinat_29193161/article/details/112801403

原网站

版权声明
本文为[Juqi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206222055328910.html