Articles on Trending Technologies

Technical articles with clear explanations and examples

IntlChar getBlockCode() function in PHP

Samual Sam
Samual Sam
Updated on 15-Mar-2026 80 Views

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 More

IntlChar isdefined() function in PHP

Samual Sam
Samual Sam
Updated on 15-Mar-2026 137 Views

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 More

IntlChar charType() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 109 Views

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 More

IntlChar charDirection() function in PHP

Samual Sam
Samual Sam
Updated on 15-Mar-2026 115 Views

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 More

IntlChar tolower() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 108 Views

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 More

IntlChar toupper() function in PHP

Samual Sam
Samual Sam
Updated on 15-Mar-2026 91 Views

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 More

imagecreate() function in PHP

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 7K+ Views

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 More

imagesx() function in PHP

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 329 Views

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

imagesy() function in PHP

George John
George John
Updated on 15-Mar-2026 147 Views

The imagesy() function gets the height of an image resource in PHP. It returns the height of the image in pixels or FALSE on errors. Syntax imagesy(image) Parameters image − An image resource created by one of the image creation functions like imagecreatetruecolor(), imagecreatefromjpeg(), etc. Return Value The imagesy() function returns the height of the image in pixels as an integer, or FALSE on failure. Example The following example demonstrates how to get the height of a newly created image − ...

Read More

imagecolorat() function in PHP

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 386 Views

The imagecolorat() function gets the color index of a pixel at specific coordinates in an image resource. It's useful for analyzing pixel colors in image processing tasks. Syntax imagecolorat($image, $x, $y) Parameters $image − An image resource created by functions like imagecreate() or imagecreatefromjpeg() $x − The x-coordinate of the pixel (horizontal position) $y − The y-coordinate of the pixel (vertical position) Return Value Returns the color index as an integer, or FALSE on failure. For truecolor images, this returns the RGB value as a packed integer. Example 1: ...

Read More
Showing 22621–22630 of 61,297 articles
Advertisements