Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 200004

RE: [PHP4BETA] Two questions: From: Andi Gutmans (andi <email protected>)
Date: 04/13/00

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>