php4-beta | 200004
Date: 04/13/00
- Next message: Andrei Zmievski: "Re: [PHP4BETA] Two questions:"
- Previous message: Chad Cunningham: "Re: [PHP4BETA] bugs and a leak"
- In reply to: Colin Viebrock: "RE: [PHP4BETA] Two questions:"
- Next in thread: Andrei Zmievski: "Re: [PHP4BETA] Two questions:"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>
>For additional commands, e-mail: php4beta-help <email protected>
>To contact the list administrators, e-mail: php4beta-admin <email protected>
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>
- Next message: Andrei Zmievski: "Re: [PHP4BETA] Two questions:"
- Previous message: Chad Cunningham: "Re: [PHP4BETA] bugs and a leak"
- In reply to: Colin Viebrock: "RE: [PHP4BETA] Two questions:"
- Next in thread: Andrei Zmievski: "Re: [PHP4BETA] Two questions:"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

