Home > Article > Backend Development > In PHP, the IntlChar charDirection() function is used to return the direction attribute of a given character.
IntlChar charDirection() function is used to display the bidirectional category value of the input value.
int IntlChar::charDirection(val)
val - An integer or character encoded as a UTF-8 string.
IntlChar charDirection() function returns the following bidirectional category value-
IntlChar::CHAR_DIRECTION_LEFT_TO_RIGHT
li>IntlChar::CHAR_DIRECTION_RIGHT_TO_LEFT
p>
##IntlChar: : Char_direction_pop_directional_format
#ain :: char_direction_non_spacing_mark
<?php var_dump(IntlChar::charDirection("-")); echo "<br>"; var_dump(IntlChar::charDirection("*")); echo "<br>"; var_dump(IntlChar::charDirection("kjh")); echo "<br>"; var_dump(IntlChar::charDirection("H")); echo "<br>"; ?>###Output##### #The following is the output-###
int(3) int(10) NULL int(0)###
The above is the detailed content of In PHP, the IntlChar charDirection() function is used to return the direction attribute of a given character.. For more information, please follow other related articles on the PHP Chinese website!