Jump to content

[SOLVED] class{}, the :: thing


Darkness Soul

Recommended Posts

Hi guys...

 

I don't have a clue of how to search for "::" topics. I tryed the :: with few keywords, without sucess.

 

I'm used to "->", and I just step in this "::", so.. what the heck is that? :)

 

Is is an alternative to "->"? If not, what is it used for?

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/151951-solved-class-the-thing/
Share on other sites

:: is called "scope resolution operator" go ahead google this now instead of :: ,

 

its used for static function , static variables , constant in a class , plus calling public function from outside the class, and also parent::function() , when subclass calles a perent function , or simpley self::function() in case of static function.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.