Re: Use of "var" in PHP4 OOP




phpGuru 寫道:

> var is used to declare a property for the class. But php allows you to
> dynamically add property like the code you have given. Declaring
> properties for the class is important specially when you are doing
> frameworks so you could easily associate the properties from one class
> to the other or you will let the user of your class know what are the
> available properties.
>
> Hope that helps a bit.

thanks for your explaination.

.


Quantcast