Difference between

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mudgil.gaurav
Forum Newbie
Posts: 17
Joined: Wed Oct 08, 2008 4:39 am

Difference between

Post by mudgil.gaurav »

Hi

Can any one brief me what is the difference between

$obj =& new Class();

AND

$obj = new Class();
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Difference between

Post by onion2k »

Technically the first one is a reference and the second is a copy, but as both will be initialising a new instance there won't actually be any difference between them.
Post Reply