PHP | IntlChar::charMirror() Function Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The IntlChar::charMirror() function is an inbuilt function in PHP which is used to find the "mirror-image" character from the given input code point character, which maps the specified character. Syntax: mixed IntlChar::charMirror( $codepoint ) Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is a character or integer value, which is encoded as a UTF-8 string. Return Value: This function returns another Unicode code point that may serve as a mirror-image substitute, or codepoint itself if there is no such mapping or the codepoint does not have the Bidi_Mirrored property. The function returns an integer unless code point was passed in UTF-8 string and a string will be returned. Below programs illustrate the IntlChar::charMirror() Function in PHP. Program 1: php <?php // PHP code to illustrate // IntlChar::charMirror ()function // Input Alphabet codepoint character var_dump(IntlChar::charMirror("A")); var_dump(IntlChar::charMirror("B")); // Input codepoint is Symbloic var_dump(IntlChar::charMirror("&")); var_dump(IntlChar::charMirror("{")); var_dump(IntlChar::charMirror("^")); var_dump(IntlChar::charMirror("]")); // Input codepoint is integer var_dump(IntlChar::charMirror("2")); var_dump(IntlChar::charMirror("10")); ?> Output: string(1) "A" string(1) "B" string(1) "&" string(1) "}" string(1) "^" string(1) "[" string(1) "2" NULL Program 2: php <?php // PHP code to illustrate // IntlChar::charMirror() function // Declare an array $arr $arr = array("G", "Geek", "801", "7", "F", " \\", "/ ", "\t"); // Loop run for every array element foreach ($arr as $val){ // Check each element as code point data var_dump(IntlChar::charMirror($val)); } ?> Output: string(1) "G" NULL NULL string(1) "7" string(1) "F" NULL NULL string(1) " " Related Articles: IntlChar::charDigitValue() Function IntlChar::isblank() Function IntlChar::iscntrl() Function Reference: https://www.php.net/manual/en/intlchar.charmirror.php Comment More infoAdvertise with us Next Article PHP | IntlChar::chr() Function J jit_t Follow Improve Article Tags : PHP PHP-Intl Similar Reads PHP | IntlChar::chr() Function The IntlChar::chr() function is an inbuilt function in PHP which is used to check whether the given input character is Unicode code point value or not. It returns Unicode character by code point value.Syntax: string IntlChar::chr( $codepoint ) Parameters: This function accepts a single parameter $co 2 min read PHP | IntlChar::chr() Function The IntlChar::chr() function is an inbuilt function in PHP which is used to check whether the given input character is Unicode code point value or not. It returns Unicode character by code point value.Syntax: string IntlChar::chr( $codepoint ) Parameters: This function accepts a single parameter $co 2 min read PHP | IntlChar::chr() Function The IntlChar::chr() function is an inbuilt function in PHP which is used to check whether the given input character is Unicode code point value or not. It returns Unicode character by code point value.Syntax: string IntlChar::chr( $codepoint ) Parameters: This function accepts a single parameter $co 2 min read PHP IntlChar::charName() Function PHP IntlChar::charName() function is an inbuilt function in PHP used to retrieve the name of a Unicode character. Syntax: string IntlChar::charName( $codepoint [, $nameChoice = IntlChar::UNICODE_CHAR_NAME] ) Parameters: This function accepts two parameters as mentioned above and described below: $co 2 min read PHP IntlChar::charName() Function PHP IntlChar::charName() function is an inbuilt function in PHP used to retrieve the name of a Unicode character. Syntax: string IntlChar::charName( $codepoint [, $nameChoice = IntlChar::UNICODE_CHAR_NAME] ) Parameters: This function accepts two parameters as mentioned above and described below: $co 2 min read PHP IntlChar::charName() Function PHP IntlChar::charName() function is an inbuilt function in PHP used to retrieve the name of a Unicode character. Syntax: string IntlChar::charName( $codepoint [, $nameChoice = IntlChar::UNICODE_CHAR_NAME] ) Parameters: This function accepts two parameters as mentioned above and described below: $co 2 min read Like