What does "final" mean in PHP? [closed]
final static public function registerAutoload(){}
It effectively means that sub-classes cannot override this method, or as the PHP final keyword documentation states:
"...prevents child classes from overriding a method by prefixing the definition with final. If the class itself is being defined final then it cannot be extended."
It means a child class cannot override the method registerAutoload
.
The same as in every other language: any class that extends another containing a final
method cannot override that specific method.
精彩评论