自从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”怎么办?的更多相关文章

  1. PHP 解决版本问题:"Assigning the return value of new by reference is deprecated"

    问题描述:     在最近使用ECSHOP v273帮客户建立了一个商城系统,商城搭建一切ok但在使用中后台发现了一个500错误     在服务器上访问该地址发现了错误信息:"Assigni ...

  2. 显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法

    很多朋友的php程序当php的版本升级到5.3以后,会出现”Deprecated: Assigning the return value of new by reference is deprecat ...

  3. ecshop报错”Deprecated: Assigning the return value of…”解决办法

    ECSHOP生成站点地图提示”Deprecated: Assigning the return value of new by reference is deprecated in…”. 我的问题在批 ...

  4. Deprecated: Assigning the return value of new by reference is deprecated in报错

    出现了Deprecated: Assigning the return value of new by reference is deprecated in wwwroot\common.inc.ph ...

  5. zencart 显示Deprecated: Assigning the return value of new by reference is deprecated

    很多朋友的php程序当php的版本升级到5.3以后,会出现"Deprecated: Assigning the return value of new by reference is dep ...

  6. JNI Local Reference Changes in ICS

    [This post is by Elliott Hughes, a Software Engineer on the Dalvik team. — Tim Bray] If you don’t wr ...

  7. php面试题之三——PHP语言基础(基础部分)

    三.PHP语言基础 1. strlen( )与 mb_strlen( )的作用分别是什么(新浪网技术部) strlen和mb_strlen都是用于获取字符串长度. strlen只针对单字节编码字符,也 ...

  8. PHP面试题及答案解析(1)—PHP语法基础

    1. strlen( )与 mb_strlen( )的作用分别是什么? strlen和mb_strlen都是用于获取字符串长度.strlen只针对单字节编码字符,也就是说它计算的是字符串的总字节数.如 ...

  9. javascript中return function与return function()的区别

    参考https://stackoverflow.com/questions/7629891/functions-that-return-a-function-javascript 问题:唯一的区别是r ...

随机推荐

  1. CSS进阶:提高你前端水平的 4 个技巧

    译者注:随着 Node.js .react-native 等技术的不断出现,和互联网行业的创业的层出不穷,了解些前端知识,成为全栈攻城师,快速的产出原型,展示你的创意,对程序员,尤其是在创业的程序员来 ...

  2. IOS之GCD记录

    在 GCD 中,加入了两个非常重要的概念: 任务 和 队列. 任务:即操作,你想要干什么,说白了就是一段代码,在 GCD 中就是一个 Block,所以添加任务十分方便.任务有两种执行方式: 同步执行 ...

  3. 使用Jenkins进行android项目的自动构建(6)

    之前已经介绍过使用Maven做构建,在来介绍一下Gralde的自动化构建. 什么是Gralde?官方的解释是 Gradle is an open source build automation sys ...

  4. Javascript中setTimeout()以及clearTimeout( )的使用

    setTimeout setTimeout( ) 是属于 window 的 method, 这是用来设定一个时间,时间到了, 就会执行一个指定的 方法.练习一:等候三秒才执行的 alert( )set ...

  5. whatis命令

    whatis——于查询一个命令执行什么功能 示例1: # whatis ls 显示ls命令的功能,和执行man命令时NAME信息差不多

  6. (转)编码剖析Spring管理Bean的原理

    http://blog.csdn.net/yerenyuan_pku/article/details/52832434 在Spring的第一个案例中,我们已经知道了怎么将bean交给Spring容器进 ...

  7. 【Hive】explain command throw ClassCastException in 2.3.4

    参考:https://issues.apache.org/jira/browse/HIVE-21489 (一)问题描述: Hive-2.3.4 执行  explain select * from sr ...

  8. caffe proto

    所在目录为: /src/caffe/proto 在caffe.proto中定义了很多结构化数据,比如LayerParameter.Datum.NetParameter.SolverParameter. ...

  9. const函数的使用

    const知道吗?解释其作用. 1.const 修饰类的成员变量,表示成员常量,不能被修改. 2.const修饰函数承诺在本函数内部不会修改类内的数据成员,不会调用其它非 const 成员函数. 3. ...

  10. 【软件构造】(转)Git详解、常用操作与版本图

    版本控制与Git 转自:http://www.cnblogs.com/angeldevil/p/3238470.html 版本控制 版本控制是什么已不用在说了,就是记录我们对文件.目录或工程等的修改历 ...