note 42536 deleted from language.references.whatdo by colder

From: Date: Sat, 24 Feb 2007 11:46:28 +0000
Subject: note 42536 deleted from language.references.whatdo by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-123822@lists.php.net to get a copy of this message
Note Submitter: phpmaster a#t cybercow #se= ---- Regarding to what "todd at nemi dot net" said, that you don't need to add an ampersand on code like this, because you get the same result without it. function myClass() { //...some code... return $this; } $myObj =& new myClass() I just experienced something else. I have a pretty complicated/large class relation ship in one part of our software. And when I didn't enter the ampersand I got a totally different result from my function, an array from a totaly different array. So my suggestion is that you enter the ampersand so it looks like this. function &getError() { return $this->systemError; } $errors = & $connection->getError();

« previous php.notes (#123822) next »