What is Static Members ?
- Static properties and methods can be used without creating an instance of the class.
- The static keyword is used to declare properties and methods of a class as static.
- Object not create.
- Stack keyword use before access modifier.
- Inside class use self::(use static method).
- inherit use parent class name ::(properties).
Example :
Example Constructor :-
Latest posts by vikashdev k (see all)
- PHP OOP: Traits - October 25, 2021
- PHP OOP: Late Static Binding - October 25, 2021
- PHP OOP : Static Members - October 23, 2021