problem: references

From: Date: Wed, 31 May 2000 13:37:13 +0000
Subject: problem: references
Groups: php.version4 
Request: Send a blank email to php-version4+get-15974@lists.php.net to get a copy of this message
hi there first code sample: <? class test { var $x; function getx (&$r) { $r = &$this->x; } } $v = "some text"; $t = new test; $t->x = 10; $t->getx ($v); print ("test=$v"); ?> and result is ... "some text" !!! what i want is to get the _reference_ to the $t->$x but via function.(btw. can function return a reference?) what is wrong ?? any ideas ?? maybe my code is wrong ... dariusz malinowski

« previous php.version4 (#15974) next »