Any body know about :: key whats for..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shajinvk
Forum Newbie
Posts: 4
Joined: Fri Mar 05, 2010 6:50 am

Any body know about :: key whats for..

Post 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
davex
Forum Contributor
Posts: 101
Joined: Sat Feb 27, 2010 4:10 pm
Location: Namibia

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

Post 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.
lshaw
Forum Commoner
Posts: 69
Joined: Mon Apr 20, 2009 3:40 pm
Location: United Kingdom

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

Post 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
Post Reply