I am using WampServer 2.0i which includes
- Apache 2.2.11
- MySQL 5.1.36
- PHP 5.3.0
while running the page it shows somethings like
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\wirelesscomplete\sections\catalog\products\add.php on line 10
Please help me to fix this
Assigning the return value of new by referenceis deprecated
Moderator: General Moderators
Re: Assigning the return value of new by referenceis deprecated
Code: Select all
$foo =& new bar();- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Assigning the return value of new by referenceis deprecated
To explain a bit further, in PHP5, objects are passed by reference by default (whereas PHP4 passes by value by default). Therefore, as tasairis pointed out, they are not needed.