码迷,mamicode.com
首页 > 其他好文 > 详细

出现 Assigning the return value of new by reference is deprecated in xxxx &&“Warning: Call-time pass-by-reference has been deprecated”怎么办?

时间:2014-07-31 12:57:16      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   for   art   问题   

自从php5.3,越来越多的人会遇到“Assigning the return value of new by reference is deprecated in xxxx”这样的提示,尤其是在国外产品中(例如wordpress、joolma),很多人的解决办法很简单:把php版本换回就版本就ok了。毫无疑问这是个好办法,对这种遇到问题不求甚解的态度可能会让人看到些什么。我认为要换回php的旧版本,其实是对php技术爱好者的一种羞辱(用词不当,大致是这个意思)。解决办法:php5.3开始后,废除了php中的"=&"符号,所以要想复制,直接用=引用即可。详细如下:

1、PHP5对象复制是采用引用的方式;
2、如果不采用引用方式,则需要在复制对象时加关键字 clone;
3、如果在复制的过程中,同时要变更某些属性,则增加函数_clone();

http://blog.csdn.net/shimch/article/details/630158

http://www.liuhuadong.com/archives/904

出现 Assigning the return value of new by reference is deprecated in xxxx &&“Warning: Call-time pass-by-reference has been deprecated”怎么办?,布布扣,bubuko.com

出现 Assigning the return value of new by reference is deprecated in xxxx &&“Warning: Call-time pass-by-reference has been deprecated”怎么办?

标签:style   blog   http   color   io   for   art   问题   

原文地址:http://www.cnblogs.com/jamesbd/p/3880472.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!