Possible Duplicate:
In PHP, whats the difference between :: and ->?
In PHP, what is the main difference of while calling a function() inside a class with arrow -> and Scope Resolution Operator :: ?
For more clearance, the difference between:
$name = $foo->getName();
$name = $foo::getName();
What is the main profit of Scope Resolution Operator :: ?
This will invoke a member or static function of the object
$foo, whilewill invoke a static function of the class of
$foo. The ‘profit’, if you wanna call it that, of using::is being able to access static members of a class without the need for an object instance of such class. That is,