After upgrading php to php5.3 today, the following error occurs: Deprecated: Assigningthereturnvalueofnewbyreferenceisd...
After upgrading php to php5.3 today, the following error occurs: Deprecated: Assigning the return value of new by reference is deprecated in, later, I found some help and found out that php5.3 does not support =.
Deprecated: Assigning the return value of new by reference is deprecated in solution:
Error Line: $ mysql = & new mysql;
Cause of error: after php5.3, the "= &" symbol in php is abolished.
Solution:
1. to copy a file, use = to reference it directly. Details are as follows: 1. PHP5 object replication uses the reference method;
2. if the reference method is not used, add the keyword clone when copying the object;
3. if you want to change some attributes during the replication process, add function _ clone ();
Link to this article:
Add to favorites ^ please keep the tutorial address.