IntlChar
PHP Manual

IntlChar::isupper

(PHP 7)

IntlChar::isupperCheck if code point has the general category "Lu" (uppercase letter)

Descrição

public static bool IntlChar::isupper ( mixed $codepoint )

Determines whether the specified code point has the general category "Lu" (uppercase letter).

Nota:

This misses some characters that are also uppercase but have a different general category value. In order to include those, use IntlChar::isUUppercase().

Parâmetros

codepoint

Um codepoint integer (por exemplo 0x2603 para U+2603 SNOWMAN), ou um caracter codificado como uma string UTF-8 (exemplo "\u{2603}")

Valor Retornado

Returns TRUE if codepoint is an Lu uppercase letter, FALSE if not.

Exemplos

Exemplo #1 Testando codepoints diferentes

<?php
var_dump
(IntlChar::isupper("A"));
var_dump(IntlChar::isupper("a"));
var_dump(IntlChar::isupper("Φ"));
var_dump(IntlChar::isupper("φ"));
var_dump(IntlChar::isupper("1"));
?>

O exemplo acima irá imprimir:

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

Veja Também


IntlChar
PHP Manual