IntlChar::charMirror() function in PHP

The IntlChar::charMirror() functionfind the “mirror-image” character from the entered character.

Syntax

IntlChar::charMirror(val)

Parameters

  • val − A character or integer value encoded as a UTF-8 string.

Return

The IntlChar::charMirror() function returns another Unicode code point that may serve as a mirror-image substitute, or codepoint itself if there is no such mapping or codepoint does not have the Bidi_Mirrored property.

Example

The following is an example −

";
   var_dump(IntlChar::charMirror("*"));
   echo "
";    var_dump(IntlChar::charMirror("}"));    echo "
";    var_dump(IntlChar::charMirror("["));    echo "
";    var_dump(IntlChar::charMirror("("));    echo "
"; ?>

Output

The following is the output −

string(1) "K"
string(1) "*"
string(1) "{"
string(1) "]"
string(1) ")"
Updated on: 2019-12-30T08:40:28+05:30

80 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements