JAVA、PHP、前端、APP、网站开发 - 开发技术学习

开发技术学习 » 编程开发 » PHP显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法

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

此文被围观3926日期: 2013-05-18 分类 : 编程开发  标签:  ······
今天做自定义表单的时候,出现了以下提示: Deprecated: Assigning the return value of new by reference is deprecated in 定位到出错的那一行: $_MooClass[$classname] = & new $classname; 我本地环境用的是PHP/5.3.3。 解决办法:php5.3开始后,废除了php中的”=&”符号,所以要想复制,直接用=引用即可。详细如下: 1、PHP5对象复制是采用引用的方式; 2、如果不采用引用方式,则需要在复制对象时加关键字 clone; 3、如果在复制的过程中,同时要变更某些属性,则增加函数_clone();

站点声明:部分内容源自互联网,为传播信息之用,如有侵权,请联系我们删除。

© Copyright 2011-2024 www.kfju.com. All Rights Reserved.
超级字帖 版权所有。蜀ICP备12031064号