Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Server Side Programming Articles
Page 1053 of 2109
IntlChar getFC_NFKC_Closure() function in PHP
The IntlChar::getFC_NFKC_Closure() function retrieves the FC_NFKC_Closure property for a given Unicode character. This property contains the string that the character maps to under NFKC (Normalization Form KC) normalization closure. Syntax IntlChar::getFC_NFKC_Closure(mixed $codepoint) Parameters codepoint − An integer codepoint value or a character encoded as a UTF−8 string. Return Value Returns the FC_NFKC_Closure property string for the given character, or null if the character has no FC_NFKC_Closure mapping. Example The following example demonstrates the function with various Unicode characters −
Read MoreIntlChar getBidiPairedBracket() function in PHP
The IntlChar::getBidiPairedBracket() function returns the paired bracket character for a given Unicode character. This function is useful when working with bidirectional text processing where you need to find the matching bracket for proper text rendering. Syntax IntlChar::getBidiPairedBracket(mixed $codepoint) Parameters codepoint − An integer codepoint value or a character encoded as a UTF-8 string. Return Value Returns the mapped paired bracket character as a string, or the original character if no paired bracket exists. Returns NULL for invalid input. Example The following example demonstrates how to find paired brackets ...
Read MoreIntlChar getBlockCode() function in PHP
The IntlChar::getBlockCode() function is used to get the Unicode allocation block containing the specified character value. This function helps identify which Unicode block a character belongs to, such as Basic Latin, Greek, or Miscellaneous Symbols. Syntax IntlChar::getBlockCode(mixed $codepoint) Parameters codepoint − An integer codepoint value (e.g., 0x41 for 'A') or a character encoded as a UTF-8 string (e.g., "A"). Return Value The function returns an integer representing the Unicode block code constant. Common block codes include ? IntlChar::BLOCK_CODE_BASIC_LATIN − For characters A-Z, a-z, 0-9 IntlChar::BLOCK_CODE_GREEK − For Greek ...
Read MoreIntlChar isdefined() function in PHP
The IntlChar::isdefined() function checks whether a Unicode character is defined in the Unicode standard. It determines if the given character has an assigned meaning and properties. Syntax bool IntlChar::isdefined(mixed $codepoint) Parameters codepoint − An integer or single character encoded as a UTF-8 string representing a Unicode code point. Return Value Returns TRUE if the character is defined in Unicode, FALSE otherwise, or NULL on failure (invalid input). Example The following example demonstrates checking various characters ? Output The following is the output ...
Read MoreIntlChar charType() function in PHP
The IntlChar::charType() function determines the general Unicode category of a character. This function is part of PHP's Intl extension and helps classify characters according to Unicode standards. Syntax int IntlChar::charType(mixed $codepoint) Parameters $codepoint − An integer codepoint value or a character/string encoded as UTF-8. Return Value Returns an integer representing the general category. Common categories include − IntlChar::CHAR_CATEGORY_UPPERCASE_LETTER − Uppercase letters (A-Z) IntlChar::CHAR_CATEGORY_LOWERCASE_LETTER − Lowercase letters (a-z) IntlChar::CHAR_CATEGORY_DECIMAL_DIGIT_NUMBER − Decimal digits (0-9) IntlChar::CHAR_CATEGORY_OTHER_PUNCTUATION − Punctuation marks IntlChar::CHAR_CATEGORY_MATH_SYMBOL − Mathematical symbols IntlChar::CHAR_CATEGORY_CURRENCY_SYMBOL − Currency symbols IntlChar::CHAR_CATEGORY_SPACE_SEPARATOR − Space characters ...
Read MoreIntlChar charDirection() function in PHP
The IntlChar charDirection() function is used to determine the bidirectional category value for a given character, which is essential for proper text rendering in multilingual applications. Syntax int IntlChar::charDirection(mixed $codepoint) Parameters $codepoint − An integer codepoint value or a character encoded as a UTF-8 string. Return Value The function returns an integer representing the bidirectional category. Common return values include ? IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT (0) − Left-to-right characters like Latin letters IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT (1) − Right-to-left characters like Arabic letters IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER (2) − European digits (0-9) IntlChar::CHAR_DIRECTION_EUROPEAN_NUMBER_SEPARATOR (3) − Separators like ...
Read MoreIntlChar tolower() function in PHP
The IntlChar::tolower() function converts a Unicode character to its lowercase equivalent. This function is part of PHP's Intl extension and works with Unicode codepoints and UTF-8 encoded characters. Syntax IntlChar::tolower(mixed $codepoint) Parameters codepoint − An integer representing a Unicode codepoint value, or a character encoded as a UTF-8 string. Return Value The function returns the lowercase equivalent of the given character. If the character is already lowercase or has no lowercase mapping, the same character is returned. Returns NULL on failure or for invalid input. Example The following ...
Read MoreIntlChar toupper() function in PHP
The IntlChar::toupper() function converts a character to its Unicode uppercase equivalent. It works with single characters and returns the uppercase version if available. Syntax IntlChar::toupper($val) Parameters $val − An integer or character encoded as a UTF-8 string. Must be a single character. Return Value The function returns the converted uppercase character as a string. If the character is already uppercase or has no uppercase equivalent, the same character is returned. Returns NULL for invalid input. Example The following example demonstrates converting characters to uppercase ? ...
Read Moreimagecreate() function in PHP
The imagecreate() function is used to create a new palette−based image resource in PHP. While functional, it's recommended to use imagecreatetruecolor() instead for better image quality, as it creates true color images that support millions of colors rather than the 256−color palette limitation of imagecreate(). Syntax imagecreate($width, $height) Parameters Parameter Type Description $width int The width of the image in pixels $height int The height of the image in pixels Return Value Returns an image resource identifier on success, or FALSE on failure. ...
Read Moreimagesx() function in PHP
The imagesx() function gets the width of an image resource in PHP. It returns the width of the image in pixels or FALSE on errors. Syntax imagesx(image) Parameters image − An image resource created by one of the image creation functions like imagecreatetruecolor(), imagecreatefromjpeg(), etc. Return Value The imagesx() function returns the width of the image in pixels as an integer, or FALSE on failure. Example The following example demonstrates how to get the width of a newly created image resource ? ...
Read More