problem: references

[email protected] (Dariusz Malinowski) Wed, 31 May 2000 15:37:13 +0200
Newsgroups php.version4
Message-ID <[email protected]>
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