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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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
> [EMAIL PROTECTED]
> http://www.neobiz.com.br

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to