note 42536 added to language.references.whatdo

From: Date: Thu, 20 May 2004 14:15:50 +0000
Subject: note 42536 added to language.references.whatdo
Groups: php.notes 
Request: Send a blank email to php-notes+get-69870@lists.php.net to get a copy of this message
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(); ---- Manual Page -- http://www.php.net/manual/en/language.references.whatdo.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42536 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42536&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42536&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69870) next »