Page 1 of 1

Any body know about :: key whats for..

Posted: Fri Mar 05, 2010 7:51 am
by shajinvk
So as you expect am a newbie in php and classes.. so i found that this symbol is used in a class. But didnt understand whats this used for( :: )..
So am expecting helps..

regards..
Shajin

Re: Any body know about :: key whats for..

Posted: Fri Mar 05, 2010 12:44 pm
by davex
It is the Scope Resolution Operator.

Simply it allows you access to static members of a class without instantiating an object.

Cheers,

Dave.

Re: Any body know about :: key whats for..

Posted: Fri Mar 05, 2010 3:35 pm
by lshaw
If you have a class that extends another class, and re-declare a function I think this operator allows you to choose to use the method from the class being extended rather than the re-declared method in the new class