On 2/25/07, xagrez <[EMAIL PROTECTED]> wrote:


thanks for the explanation.

When we code with the framework, there is no specify of
public/private/protected when we declare/initalize variable. What is the
default then?


public

Pádraic Brady-2 wrote:
>
> Do you mean using the "var" keyword in classes?
>
> If so, the equivalent in PHP5 is using "public". The additional
"private"
> and "protected" make such variable inaccessible external code not in the
> class. "protected" is a little looser since it allows subclasses to
access
> a parent class' properties.
>
> In PHP5, var is allowable to be backwards compatible with PHP4, so you
> should use the PHP5 alternatives when writing code for PHP5.
>
> Regards,
> Pádraic
>
> Pádraic Brady
> http://blog.astrumfutura.com
> http://www.patternsforphp.com
>
>
> ----- Original Message ----
> From: xagrez <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Sunday, February 25, 2007 8:44:55 AM
> Subject: [fw-general] to $var or not to?
>
>
> hello,
>
> this is not exactly a framework question.
>
> When do we use $var to declare a variable, and when not to?
> What is the practice in zf? I've just started zf for a few weeks, and I
> see
> the common practice is not to use $var.
>
> thanks
>
> --
> View this message in context:
> http://www.nabble.com/to-%24var-or-not-to--tf3286514s16154.html#a9141809
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
>
>
>
>
>
>
>
>
____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
>

--
View this message in context:
http://www.nabble.com/to-%24var-or-not-to--tf3286514s16154.html#a9146996
Sent from the Zend Framework mailing list archive at Nabble.com.




--
best regards,
André Hoffmann

Reply via email to