RE: [PHP4BETA] Two questions:

From: Date: Thu, 13 Apr 2000 20:41:00 +0000
Subject: RE: [PHP4BETA] Two questions:
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-13529@lists.php.net to get a copy of this message
Colin, You can just do the assignment in the constructor. Andi At 03:28 PM 4/13/00 -0400, Colin Viebrock wrote:
I don't think you can do var $foo = $somevariable. Doesn't really make sense to me anyways. I would think that the scope of variables in class test does not intertwine with the scope of outside variables. Except that those outside variables might be defined on another page and are global to the site. i.e. I can duplicate the entire site and just change some local variables in the one file. I'd rather not have to edit the class files everytime I make a copy of the site (as I would in your example). At the very least, I'd settle for being able to do: class test {
        var $foo = $GLOBAL['FOO'];
} or even: class test {
        global $FOO;
        var $foo = $FOO;
} __________________________________________________________________
Colin Viebrock                                easyDNS Technologies
                                               control your domain
                                            http://www.easyDNS.com
-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.version4 (#13529) next »