+ 5
The double colon `::` is known as scope resolution operator. The other one `->` is member access operator (forgot its real title). Both of these operator are used in relation to accessing a class' or object's members. So the difference in use cases is ... :: operator Used to access static members (properties or methods), or some would refer to as class members. -> operator Used to access non-static members (properties or methods), or some would refer to as object members. Some relevant links 👇 https://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php https://stackoverflow.com/questions/3037526/where-do-we-use-the-object-operator-in-php
13th Sep 2020, 9:46 AM
Ipang