PHP OOP : Static Members

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)
Tagged : / / / / / / / / / / / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x