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 −

<?php
   var_dump(IntlChar::charMirror("K"));
   echo "<br>";
   var_dump(IntlChar::charMirror("*"));
   echo "<br>";
   var_dump(IntlChar::charMirror("}"));
   echo "<br>";
   var_dump(IntlChar::charMirror("["));
   echo "<br>";
   var_dump(IntlChar::charMirror("("));
   echo "<br>";
?>

Output

The following is the output −

string(1) "K"
string(1) "*"
string(1) "{"
string(1) "]"
string(1) ")"

Updated on: 30-Dec-2019

27 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements