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
How To declare a final variable inside a Php class
Moderator: General Moderators
-
chandrakantk
- Forum Newbie
- Posts: 1
- Joined: Tue Mar 25, 2008 12:22 am
Re: How To declare a final variable inside a Php class
I believe that is correct. You can define() a variable, or set it as static, if you want to not have it modified.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.