Static and Non-static in PHP

StuartCreed - Nov 1 '20 - - Dev Community

The difference between static and non static members is only that a non static member is tied to an instance of a class although a static member is tied to the class, and not to a particular instance.
That is, a static member is shared by all instances of a class although a non static member exists for each instance of class.

The difference between self:: and $this
self:: is for static methods and it references the static methods and properties in the class from which it is called.

$this is for non static methods and references non static methods and properties in the class from which it is called.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player