Re: [PHP4BETA] Creating references to member variables - how?

From: Date: Fri, 19 Nov 1999 09:13:24 +0000
Subject: Re: [PHP4BETA] Creating references to member variables - how?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-6478@lists.php.net to get a copy of this message
At 02:29 AM 11/19/99 +0100, Leeloo Mina Lekatariba wrote:
Here's a scenario: class NodeList {
    var $nodes; // array of node references
    function item($idx) { // should return a node reference
        return &$this->nodes[$idx]; // <-- oops ... doesn't work...
    }
} Is there a way of creating a reference in this situation?
We will hopefully add this ability before the next version. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.version4 (#6478) next »