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 :
![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/static-1024x555.png)
Example Constructor :-
![](https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/sconstructor-1024x555.png)
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