Computer >> Computer tutorials >  >> Programming >> PHP

IntlChar isMirrored() function in PHP


The IntlChar isMirrored()function is used to check whether the entered value contains Bidi_Mirrored property or not.

Syntax

bool IntlChar::isMirrored (val)

Parameters

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

Return

The IntlChar isMirrored()function returns TRUE if the entered value has the Bidi_Mirrored property

Example

The following is an example −

<?php
   var_dump(IntlChar::isMirrored("<"));
   echo "<br>";
   var_dump(IntlChar::isMirrored(">"));
   echo "<br>";
   var_dump(IntlChar::isMirrored("p"));
   echo "<br>";
   var_dump(IntlChar::isMirrored("*"));
   echo "<br>";
?>

Output

The following is the output −

bool(true)
bool(true)
bool(false)
bool(false)