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 "::"
What does "::" do?
Moderator: General Moderators
Re: What does "::" do?
PHP "double-colon" works better.supermike wrote:Note it's also hard to google for what "::" does. Google seems to ignore my request like:
php "::"
So does the official name for it: Paamayim Nekudotayim.
Hope that helps.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.
-
supermike
- Forum Contributor
- Posts: 193
- Joined: Tue Feb 28, 2006 8:30 pm
- Location: Somewhere in the Desert, USA
Re: What does "::" do?
Oh. Of course. Paamayim Nekudotayim. That makes all the sense in the world. Why didn't I think of that?Roja wrote:Paamayim Nekudotayim
<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?
"All of my filth is arranged in alphabetical order. This, for instance, is under 'H' for toy. " - Real Geniussupermike wrote:Oh. Of course. Paamayim Nekudotayim. That makes all the sense in the world. Why didn't I think of that?![]()
Such is the internet.
Glad I could help.supermike wrote:Thanks, "Roja". I looked it up and sort of understand how to use it now.
And its MUCH easier to get a good search result from.supermike wrote:It's no wonder now why they used a Hebrew term for this. Zend is an Israeli company.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: What does "::" do?
I thought you were being a funny guy when I first seen that...until I clicked on the linkRoja wrote:PHP "double-colon" works better.supermike wrote:Note it's also hard to google for what "::" does. Google seems to ignore my request like:
php "::"
So does the official name for it: Paamayim Nekudotayim.
Hope that helps.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.
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