In php, is there any difference between using
$myClass::method()
and
$myClass->method()
What’s the reason for the change? (I believe -> has been around longer.)
I could see a point of using :: for methods and -> for properties or vice versa.
::is the scope resolution operator, used for accessingstaticmembers of classes.->is the member operator, used for access members of objects.Here’s an example: