php8.5
Home/ Manual/ intl / intlchar/ IntlChar::isupper

IntlChar::isupper

PHP function Edit on GitHub ✎

(PHP 7, PHP 8)

Check if code point has the general category "Lu" (uppercase letter)

Description

IntlChar::isupper(int|string $codepoint): bool|null

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

Note

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

Parameters

codepoint

Parameter

Return Values

Returns true if codepoint is an Lu uppercase letter, false if not. Returns null on failure.

Examples

Example

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

The above example will output:

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

See Also

Source: reference/intl/intlchar/isupper.xml · from the official PHP manual (php/doc-en)