Open In App

PHP IntlChar Functions Complete Reference

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

IntlChar() functions provide access of utility methods which is used to access the information about Unicode characters. The IntlChar methods and constants are close to the names and behavior which are used by ICU (International Components for Unicode) library. 

Example: programs illustrate the IntlChar::charFromName() function in PHP

PHP




<?php
 
// PHP code to illustrate
// IntlChar::charFromName ()function
     
// Input symbol of codepoint value
// with constraint UNICODE_CHAR_NAME
var_dump(IntlChar::charFromName("LATIN CAPITAL LETTER G"));
 
var_dump(IntlChar::charFromName("SNOWMAN"));
 
var_dump(IntlChar::charFromName("GEEKSFORGEEKS"));
 
var_dump(IntlChar::charFromName("^", IntlChar::CHAR_NAME_ALIAS ));
 
?>


Output:

int(71)
int(9731)
NULL
NULL

The complete list of IntlChar functions are given below

 

 Functions

Description

IntlChar::charAge() Calculate the age of the code point. 
IntlChar::charDigitValue() Return the decimal digit value from a decimal digit character. 
IntlChar::charDirection() Get the bidirectional category value for a code point. 
IntlChar::charFromName() Find Unicode characters by name and returns the code point value.
IntlChar::charMirror()  Find the “mirror-image” character from the given input code point character.
IntlChar::charName() Retrieve the name of a Unicode character.
IntlChar::charType() Get the general category value for a code point. 
IntlChar::chr()  Check whether the given input character is a Unicode code point value or not.
IntlChar::digit() Get the decimal digit value of a code point for a given radix. 
IntlChar::enumCharNames() Give a catalog of all the assigned Unicode characters that are available within a range.
IntlChar::enumCharTypes() Give a catalog of all the code points with their Unicode general categories.
IntlChar::foldCase() Perform case folding on a code point.
IntlChar::forDigit() Determines the character representation for a specific digit in the specified radix.
IntlChar::getBidiPairedBracket() Get the paired bracket character for a code point. 
IntlChar::getBlockCode() Get the Unicode allocation block containing the code point.
IntlChar::getCombiningClass() Get the combining class of the code point.
IntlChar::getFC_NFKC_Closure()  Get the FC_NFKC_Closure property for a code point.
IntlChar::getIntPropertyMaxValue() Get the maximum value for a Unicode property. 
IntlChar::getIntPropertyValue()  Get the value for the Unicode property for a code point.
IntlChar::getNumericValue()  Get the numeric value for a Unicode code point as defined in the Unicode Character Database.
IntlChar::getPropertyEnum() Get the property constant value for a given property name.
IntlChar::getPropertyName() Get the Unicode name for a given property which is given in the Unicode database file
IntlChar::getPropertyValueEnum() Get the property value from the given value.
IntlChar::getPropertyValueName() Get the Unicode name for a property value.
IntlChar::getUnicodeVersion() Get the Unicode version.
IntlChar::hasBinaryProperty() Check a binary Unicode property for a code point.
IntlChar::isalnum () Check whether the given input is an alphanumeric character (Digit or Letter) or not. 
IntlChar::isalpha() Check whether the given input is an alphanumeric character or not.
IntlChar::isbase() Check whether the given input data is a base character or not.
IntlChar::isblank() Determine the given input code data is blank or horizontal space character.
IntlChar::iscntrl()  Check the given input is a control character or not.
IntlChar::isdefined() Check whether the code point is defined or not. 
IntlChar::isdigit() Determine the given input code data is a digited character or not.
IntlChar::isgraph() Check the code point is a graphic character or not. 
IntlChar::isIDIgnorable() Determine the code point is an ignorable character or not.
IntlChar::isIDPart() Check whether the given input character is permissible in an identifier or not. 
IntlChar::isIDStart()  Check whether the given input character code point is permissible since the first character is an identifier or not.
IntlChar::isISOControl()  Check whether the input code point is an ISO control code character or not.
IntlChar::isJavaIDPart() Check whether the input code point is permissible in a Java identifier character or not. 
IntlChar::isJavaIDStart()  Check whether the input character code point is permissible since the first character is a java identifier or not.
IntlChar::isJavaSpaceChar() Check whether the input character code point is a space character or not according to Java.
IntlChar::islower() Check whether the given input character is a lowercase character or not.
IntlChar::isMirrored() Check the code point contains Bidi_Mirrored property or not. 
IntlChar::isprint() Check whether the given input character is a printable character or not.
IntlChar::ispunct() Check whether the given input character is a punctuation character or not.
IntlChar::isspace() Check whether the given input character is a space character or not.
IntlChar::istitle() Check whether the input character code point is a titlecase letter or not.
IntlChar::isUAlphabetic() Check whether the given input character is an Alphabetic Unicode character or not. 
IntlChar::isULowercase() Check whether the given input character is a Lowercase character or not. 
IntlChar::isupper() Check whether the given input character is an uppercase character or not.
IntlChar::isUUppercase() Check whether the given input character is an Uppercase Unicode character or not. 
IntlChar::isUWhiteSpace() Check whether the given input character is a WhiteSpace Unicode character or not. 
IntlChar::isWhitespace() Check whether the given input character is a WhiteSpace character or not according to ICU.
IntlChar::isxdigit() Check whether the given input character is a hexadecimal digit or not.
IntlChar::ord() Return the Unicode code point value of the given character.
IntlChar::tolower() Convert the character into Unicode lowercase character.
IntlChar::totitle() Check whether the input code point is a Unicode character title case or not.
IntlChar::toupper() Convert the character into Unicode character uppercase. 


Last Updated : 01 Feb, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads