note 15490 added to language.references.return

From: Date: Thu, 13 Sep 2001 16:42:25 +0000
Subject: note 15490 added to language.references.return
Groups: php.notes 
Request: Send a blank email to php-notes+get-17986@lists.php.net to get a copy of this message
I got REAL troubles returning references from class methods (i did not try with ordinary functions): At first all seemed to work well, but, while my project was growing bigger (i.e. started to instantiate more and more objects), the whole memory mapping of PHP 4.0.5 seemed to fail. Lines like theese: function foo($a){}; $b = "something"; foo("now it is something else"); echo($a); outputted: now it is something else I solved (walked around) those problems by returning BY VALUE from all methods. Hoping to be useful, Giorgio Gallo http://www.php.net/manual/en/language.references.return.php

« previous php.notes (#17986) next »