Friday, June 5, 2009

final keyword in PHP5

Likewise Java, the meaning of the keyword "final" in php5 is:
  • final classes: not extendable
    final class A { ...}
  • final methods: not overridable
    class A { final public function f() { ... } ...}
  • final class members(properties): not supported in PHP5 !! (differently from Java)

No comments:

Post a Comment

 

PHP and tips|PHP