PHP 8.1.20 Released!

IntlChar::getCombiningClass

(PHP 7, PHP 8)

IntlChar::getCombiningClassGet the combining class of a code point

Descrição

public static IntlChar::getCombiningClass(int|string $codepoint): ?int

Returns the combining class of the code point.

Parâmetros

codepoint

O valor int do ponto de código (por exemplo, 0x2603 para U+2603 SNOWMAN) ou o caractere codificado como uma string UTF-8 (por exemplo, "\u{2603}")

Valor Retornado

Returns the combining class of the character. Returns null on failure.

Exemplos

Exemplo #1 Testando diferentes pontos de código

<?php
var_dump
(IntlChar::getCombiningClass("A"));
var_dump(IntlChar::getCombiningClass("\u{0334}"));
var_dump(IntlChar::getCombiningClass("\u{0358}"));
?>

O exemplo acima produzirá:

int(0)
int(1)
int(232)
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top