0

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.

Community
  • 1
  • 1
Lucas Scholten
  • 925
  • 4
  • 22
  • 40
  • 2
    If you google "php double colon" your first result is: http://php.net/manual/en/language.oop5.paamayim-nekudotayim.php – Evan Mulawski Jun 07 '12 at 16:27

4 Answers4

1

It's Scope Resolution Operator (also called Paamayim Nekudotayim). It allows you to access constants or static methods.

Kasia Gogolek
  • 3,374
  • 4
  • 33
  • 50
1

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();
0

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

Explosion Pills
  • 188,624
  • 52
  • 326
  • 405
0

It is a reference to a static php function

http://php.net/manual/en/language.oop5.static.php

paquettg
  • 1,364
  • 1
  • 9
  • 16