PHP Articles

Page 66 of 81

IntlChar isdefined() function in PHP

Samual Sam
Samual Sam
Updated on 15-Mar-2026 129 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 95 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 109 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 107 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 86 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 318 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 142 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 381 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

getimagesize() function in PHP

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

The getimagesize() function in PHP is used to retrieve the dimensions and other information about an image file. It can work with both local files and remote URLs, returning an array containing width, height, image type, and additional metadata. Syntax getimagesize(file_name, img_info) Parameters file_name − The path to the image file (local or remote URL) img_info (optional) − An array to store extended information from the image file. Currently supports only JFIF files Return Value The function returns an indexed array with the following elements ? [0] − ...

Read More
Showing 651–660 of 802 articles
« Prev 1 64 65 66 67 68 81 Next »
Advertisements