Paamayim Nekudotayim

Paamayim Nekudotayim

Der Gültigkeitsbereichsoperator der Skriptsprache PHP wird offiziell Paamayim Nekudotayim (hebräisch ‏פעמיים נקודתיים‎ [paʔamajim nəkudotajim]) genannt und besteht aus zwei hintereinander gestellten Doppelpunkten (::).

Das Wort stammt aus dem Hebräischen und bedeutet übersetzt und transkribiert in etwa „zweimal Doppelpunkt“. Nekudotayim (Doppelpunkt) setzt sich aus Nekuda (Punkt) und der Dual-Endung -ayim (zwei) zusammen. Das Wort Paamayim besteht aus Paam (multiplizieren) und wieder der Endung -ayim.

Die Verwendung des Operators erlaubt es, auf Konstanten, statische Variablen oder statische Methoden einer Klasse zuzugreifen.

Beispiel

 <?php
     class Mathe {
         const PI = 3.141592653589;
     }
 
     echo Mathe::PI;
 ?>

Das Beispiel erzeugt eine neue Klasse mit dem Namen „Mathe“, die eine Konstante „PI“ enthält, in der eine Zahl (in diesem Falle π) gespeichert ist. Anschließend wird außerhalb dieser Klasse mittels des Gültigkeitsbereichsoperators (Paamayim Nekudotayim) auf diese Konstante zugegriffen und diese ausgegeben, ohne vorher eine Instanz der Klasse zu erzeugen.

Weblinks


Wikimedia Foundation.

Игры ⚽ Нужна курсовая?

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Paamayim Nekudotayim — (pronounced|paʔamajim nəkudotajim) is the official name for the Scope Resolution Operator (::) in PHP. It means twice colon or double colon in Hebrew. Nekudotayim (נקודתיים) means colon ; it comes from nekuda (IPA: IPA| [nəkuda] ), point or dot …   Wikipedia

  • Paamayim nekudotayim — (פעמיים נקודתיים) es un nombre que recibe el operador de resolución (::) en PHP y Haskell. Significa doble dos puntos en Hebreo. Nekudotayim (נקודתיים) significa dos puntos (puntiación) ; viene de nekuda (IPA: [nəkuda]), punto , y el sufijo dual… …   Wikipedia Español

  • Paamayim Nekudotayim — Le Paamayim Nekudotayim (API : [paʔamajim nəkudotajim]) est le nom officiel de l’opérateur de résolution de portée (::) utilisé en PHP pour accéder aux membres statiques ou constants d’une classe. Il s’utilise par la syntaxe Classe::Element …   Wikipédia en Français

  • Gültigkeitsbereichsoperator — Der Gültigkeitsbereichsoperator der Skriptsprache PHP wird offiziell Paamayim Nekudotayim (hebr. פעמיים נקודתיים [paʔamajim nəkudotajim]) genannt und besteht aus zwei hintereinander gestellten Doppelpunkten (::). Das Wort stammt aus dem… …   Deutsch Wikipedia

  • PHP — У этого термина существуют и другие значения, см. PHP (значения). PHP Семантика: мультипарадигменный …   Википедия

  • Scope resolution operator — In computer programming, scope is an enclosing context where values and expressions are associated. The scope resolution operator helps to identify and specify the context to which an identifier refers. The specific uses vary across different… …   Wikipedia

  • PHP — Pour les articles homonymes, voir PHP (homonymie). PHP …   Wikipédia en Français

  • PHP5 — PHP: Hypertext Preprocessor « PHP » redirige ici. Pour les autres significations, voir PHP (homonymie) …   Wikipédia en Français

  • PHP: Hypertext Preprocessor — « PHP » redirige ici. Pour les autres significations, voir PHP (homonymie) …   Wikipédia en Français

  • PHP (langage) — PHP: Hypertext Preprocessor « PHP » redirige ici. Pour les autres significations, voir PHP (homonymie) …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”