What is :: operator and in what case we use it in php?

Last updated 5 years, 1 month ago | 1145 views 75     5

Tags:- PHP

PHP | :: operator | scope resolution operator

This operator is known as the scope resolution operator. And this operator is used to access the static members of the class. To access static members of a class we do not need to create an object/instance of the class.


Class welcome {

Static public function xyz(){

Echo “Hello StudyZone4U.com”;





// Output will be "Hello StudyZone4U.com".