折雨的天空
php7语法的改变
2015-12-4 我好笨


参考中文:







https://github.com/pangee/Migrating-from-PHP5.6.x-to-PHP7.0.x/blob/master/Backward-incompatible-changes.md











其中最值得关注的是间接变量的使用,这在我们之前的代码中用得许多










PHP 7 throws an Array to string conversion error if you are accessing an object with a nested array using syntax like $object->$array['key']; I haven't researched the exact reason for this but the parser tries to convert the array to a string versus reading the array element. Wrapping the array in curly brackets (like $object->{$array['key']}) allows the parser to interpret this correctly.


参考地址:

https://www.digitalocean.com/company/blog/getting-ready-for-php-7/

上面的中文地址里,也有描述。




发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容