Re: No answers found - Why var and why & ?

From: Date: Thu, 11 Sep 2003 14:56:01 +0000
Subject: Re: No answers found - Why var and why & ?
References: 1  Groups: php.general php.windows 
Request: Send a blank email to php-general+get-162304@lists.php.net to get a copy of this message
var $varname before a constructor is just conventional syntax when defining a class. class myClass { var $myThis; function myClass() { } } I'm sure you can do this another way, but it just makes reading the class very easy, and it defines those variables for the entire scope of the class. -dd "André Cupini" <andre@neobiz.com.br> wrote in message news:20030909152154.97733.qmail@pb1.pair.com... > Save all programers! (sorry my "brazilian english") > > I have a simple doubt, but i´m tired because i not found answers... > Why, inside a class, declarare $this variables in a format "var $varname;" > before of a constructor? > And, please, what intend the "&" signal before functions name? > > I know the arguments reference methods like this: > function bla(&$reference_arg) > > But what's the diference of the sintax: > function &bla(&$var) > > Thanks for attention > > -- > André Cupini > Programador - NeoBiz > andre@neobiz.com.br > http://www.neobiz.com.br

« previous php.general (#162304) next »