PHP | IntlChar::isUAlphabetic() Function
The IntlChar::isUAlphabetic() function is an inbuilt function in PHP which is used to check whether the given input character is an Alphabetic Unicode character or not.
Syntax:
bool IntlChar::isUAlphabetic( $codepoint )
Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is an integer or character, which is encoded as a UTF-8 string.
Return Value: If $codepoint is an Alphabetic Unicode Character then returns True, otherwise return False.
Below programs illustrate the IntlChar::isUAlphabetic() function in PHP:
Program 1:
PHP
<?php
var_dump(IntlChar::isUAlphabetic( "G" ));
var_dump(IntlChar::isUAlphabetic( "B\n" ));
var_dump(IntlChar::isUAlphabetic( "Geeksforgeeks" ));
var_dump(IntlChar::isUAlphabetic( "2018" ));
var_dump(IntlChar::isUAlphabetic( "9" ));
var_dump(IntlChar::isUAlphabetic( "10.99" ));
?>
|
Output:
bool(true)
NULL
NULL
NULL
bool(false)
NULL
Program 2:
PHP
<?php
$arr = array ( "Z" , "291" , "^" , " " , "*" , "Sudo Placement" );
foreach ( $arr as $val ){
var_dump(IntlChar::isUAlphabetic( $val ));
}
?>
|
Output:
bool(true)
NULL
bool(false)
NULL
bool(false)
NULL
Related Articles:
Reference: http://php.net/manual/en/intlchar.isualphabetic.php
Last Updated :
05 Nov, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...