Category: OOP

final keyword in PHP


final keyword is used in PHP as final class and final method. A final class is one which cannot be extended. A final method cannot be overridden in extended class.

How to call non static method from static method in PHP?


If the instance of your class is rarely needed, you can have the static method create an instance, call the non-static method and return the value.