IntlChar::getPropertyValueEnum

(PHP 7, PHP 8)

IntlChar::getPropertyValueEnumGet the property value for a given value name

Beschreibung

public static IntlChar::getPropertyValueEnum(int $property, string $name): int

Returns the property value integer for a given value name, as specified in the Unicode database file PropertyValueAliases.txt. Short, long, and any other variants are recognized.

Hinweis:

Some of the names in PropertyValueAliases.txt will only be recognized with IntlChar::PROPERTY_GENERAL_CATEGORY_MASK, not IntlChar::PROPERTY_GENERAL_CATEGORY. These include:

  • "C" / "Other"
  • "L" / "Letter"
  • "LC" / "Cased_Letter"
  • "M" / "Mark"
  • "N" / "Number"
  • "P" / "Punctuation"
  • "S" / "Symbol"
  • "Z" / "Separator"

Parameter-Liste

property

Die Unicode-Eigenschaft, die gesucht werden soll (siehe die IntlChar::PROPERTY_*-Konstanten).

If out of range, or this method doesn't work with the given value, IntlChar::PROPERTY_INVALID_CODE is returned.

name

The value name to be matched. The name is compared using "loose matching" as described in PropertyValueAliases.txt.

Rückgabewerte

Returns the corresponding value integer, or IntlChar::PROPERTY_INVALID_CODE if the given name does not match any value of the given property, or if the property is invalid.

Beispiele

Beispiel #1 Testen unterschiedlicher Eigenschaften

<?php
var_dump
(IntlChar::getPropertyValueEnum(IntlChar::PROPERTY_BLOCK'greek') === IntlChar::BLOCK_CODE_GREEK);
var_dump(IntlChar::getPropertyValueEnum(IntlChar::PROPERTY_BIDI_CLASS'RIGHT_TO_LEFT') === IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT);
var_dump(IntlChar::getPropertyValueEnum(IntlChar::PROPERTY_BIDI_CLASS'some made-up string') === IntlChar::PROPERTY_INVALID_CODE);
var_dump(IntlChar::getPropertyValueEnum(123456789'RIGHT_TO_LEFT') === IntlChar::PROPERTY_INVALID_CODE);
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

bool(true)
bool(true)
bool(true)
bool(true)

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

MMOEXP: Path of Exile 2's 0.5 update is a bold, messy, and exciting

The Path of Exile 2 Orbs (https://www.mmoexp.com/Poe-2/Currency.html?fsid=961106)​ community is buzzing with excitement and controversy followin ...

Geschrieben von Ludwighench am 09.06.2026 10:50:53
Forum: Ankündigungen
MMOexp Path of Exile 2: Massive Currency Farm with this Abyss Strategy

Struggling to Earn Divine Orbs? This Low-Investment Abyss Strategy Could Be the Answer Making currency in Path of Exile 2's endgame often feels l ...

Geschrieben von Lilidala am 09.06.2026 10:47:34
Forum: Fragen/Vorschläge zum Forum
MMOEXP: FC 26 is making headlines with its largest free content

FC 26 Coins (https://www.mmoexp.com/Fc-26/Coins.html?fsid=254377)​ is making headlines with its largest free content drop since launch: "The Wor ...

Geschrieben von Ludwighench am 09.06.2026 10:44:27
Forum: Ankündigungen
Pips Puzzle Adventure: A Fun Challenge for Every Player

Introduction to Pips Pips is an engaging puzzle game that combines logic, strategy, and creativity in a simple yet highly addictive format. The ...

Geschrieben von JesusaikNadeau am 09.06.2026 10:26:16
Forum: PHP Developer Forum