Page 1 of 1

How To declare a final variable inside a Php class

Posted: Tue Mar 25, 2008 12:25 am
by chandrakantk
Hi everyone,
I am new to PHP. Just wanted to know how to declare a final variable in php class.
It tried it in one of ide, it says that final is allowed for method only. Wanted to confirm this.


Thanks in Advance.

Chandrakant K

Re: How To declare a final variable inside a Php class

Posted: Tue Mar 25, 2008 9:58 am
by pickle
I believe that is correct. You can define() a variable, or set it as static, if you want to not have it modified.