Page 1 of 1

What does "::" do?

Posted: Tue Feb 28, 2006 10:33 pm
by supermike
Since PHP 5, I've seen a new operator -- "::" -- used in classes and I guess it is sort of like the "->" operator. The PHP.net site is down for me tonight for some reason. I was wondering if anyone knew what "::" does. Currently I'm still using PHP 4 for my work because that has the widest market. Probably next year I'll go full-bore on PHP 5.

Note it's also hard to google for what "::" does. Google seems to ignore my request like:

php "::"

Re: What does "::" do?

Posted: Tue Feb 28, 2006 10:37 pm
by Roja
supermike wrote:Note it's also hard to google for what "::" does. Google seems to ignore my request like:

php "::"
PHP "double-colon" works better.

So does the official name for it: Paamayim Nekudotayim.
The Fine Manual wrote: The Scope Resolution Operator (also called Paamayim Nekudotayim) or in simpler terms, the double colon, is a token that allows access to static, constant, and overridden members or methods of a class.
Hope that helps.

Re: What does "::" do?

Posted: Tue Feb 28, 2006 10:44 pm
by supermike
Roja wrote:Paamayim Nekudotayim
Oh. Of course. Paamayim Nekudotayim. That makes all the sense in the world. Why didn't I think of that? :roll:

<laughter>

Thanks, "Roja". I looked it up and sort of understand how to use it now.

It's no wonder now why they used a Hebrew term for this. Zend is an Israeli company.

Re: What does "::" do?

Posted: Tue Feb 28, 2006 11:04 pm
by Roja
supermike wrote:Oh. Of course. Paamayim Nekudotayim. That makes all the sense in the world. Why didn't I think of that? :roll:
"All of my filth is arranged in alphabetical order. This, for instance, is under 'H' for toy. " - Real Genius

Such is the internet. :)
supermike wrote:Thanks, "Roja". I looked it up and sort of understand how to use it now.
Glad I could help.
supermike wrote:It's no wonder now why they used a Hebrew term for this. Zend is an Israeli company.
And its MUCH easier to get a good search result from. ;)

Re: What does "::" do?

Posted: Tue Feb 28, 2006 11:23 pm
by alex.barylski
Roja wrote:
supermike wrote:Note it's also hard to google for what "::" does. Google seems to ignore my request like:

php "::"
PHP "double-colon" works better.

So does the official name for it: Paamayim Nekudotayim.
The Fine Manual wrote: The Scope Resolution Operator (also called Paamayim Nekudotayim) or in simpler terms, the double colon, is a token that allows access to static, constant, and overridden members or methods of a class.
Hope that helps.
I thought you were being a funny guy when I first seen that...until I clicked on the link :?

Never in all my years as a C++ developer have I ever heard of it being refered to as anything other than scope resolution operator...

And now thanks to PHP it might very well take on a new name...

Gives new meaning to the phrase: "If it was hard to write...it should be equally hard to understand" or pronounce :P