Paamayim Nekudotayim
From Wikipedia, the free encyclopedia
| It has been suggested that this article or section be merged into Scope resolution operator. (Discuss) |
Paamayim Nekudotayim (Hebrew: פעמיים נקודתיים, pronounced [paʔamajim nəkudotajim])[where's the stress?] is a name for the scope resolution operator (::) in PHP. It means "twice colon" or "double colon" in Hebrew. It may be helpful to note that in some cases this error may occur when the $ symbol is not included in the use of a variable.
Nekudotayim (נקודתיים) means 'colon'; it comes from nekuda [nəkuda],[where's the stress?] 'point' or 'dot', and the dual suffix ayim (יים-), hence 'two points'. Similarly, the word paamayim (פעמיים) is derived by attaching the dual suffix to paam [paʔam] ('one time' or 'once'), thus yielding 'twice'.
The name was introduced in the Israeli-developed[1] Zend Engine 0.5 used in PHP 3. Although it has been confusing to many developers, it is still being used in PHP 5, as in this sample error message:
$ php -r '::'
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in Command line code on line 1
This error can also occur where no scope resolution operator is present. For example, attempting to check whether a constant is empty() triggers this error:
$ php -r "define('foo', 'bar'); if (empty(foo)) echo 'empty';"
Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in Command line code on line 1
[edit] See also
- PHP
- Scope (programming)
- Name resolution, which includes a discussion of scope resolution
- Niqqud on the vowel points used in Hebrew writing
[edit] References
- ^ "Scope Resolution Operator". PHP5 Manual. http://php.net/manual/language.oop5.paamayim-nekudotayim.php. Retrieved on 2007-08-09.

