Possible Duplicate:
Reference - What does this symbol mean in PHP?
I've come accross this notation in PHP magento 'Mage::run()'.
What does :: mean? Can't seem to find a simple explanation anywhere.
Possible Duplicate:
Reference - What does this symbol mean in PHP?
I've come accross this notation in PHP magento 'Mage::run()'.
What does :: mean? Can't seem to find a simple explanation anywhere.
It's Scope Resolution Operator (also called Paamayim Nekudotayim). It allows you to access constants or static methods.
It allows you to call a static function/method in a class, without making an instance of the class:
class myClass{
static function myFunction(){
echo"foo";
}
}
now call it like this with ::
myClass::myFunction;
with a public function, you would have to make an instance:
$mycalssinstance= new myCalss;
//then call it
$mycalssfunction=$mycalssinstance->myFunction();
Call to a static (class) method. You can call this without an instance of the class.
http://us.php.net/manual/en/language.oop5.paamayim-nekudotayim.php