PHP | IntlChar::isUUppercase() Function
Last Updated :
30 Mar, 2023
The IntlChar::isUUppercase() function is an inbuilt function in PHP which is used to check whether the given input character is an Uppercase Unicode character or not.
Syntax:
bool IntlChar::isUUppercase( $codepoint )
Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is a character value, which is encoded as a UTF-8 string.
Return Value: If $codepoint is an UpperCase Unicode character then it returns True, otherwise return False.
Note:The function is different from IntlChar::isupper() function.
Below programs illustrate the IntlChar::isUUppercase() Function in PHP:
Program 1:
PHP
<?php
var_dump(IntlChar::isUUppercase( "M" ));
var_dump(IntlChar::isUUppercase( "m" ));
var_dump(IntlChar::isUUppercase( "GEEKS" ));
var_dump(IntlChar::isUUppercase( "geeks" ));
var_dump(IntlChar::isUUppercase( "7" ));
?>
|
Output:
bool(true)
bool(false)
NULL
NULL
bool(false)
Program 2:
PHP
<?php
$arr = array ( "X" , "ReportBug" , "^" , "c" , "\t" );
foreach ( $arr as $val ) {
var_dump(IntlChar::isUUppercase( $val ));
}
?>
|
Output:
bool(true)
NULL
bool(false)
bool(false)
bool(false)
Related Articles:
Reference: http://php.net/manual/en/intlchar.isuuppercase
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...