The IntlChar::forDigit() function displays the character representation of specified digit in the specified radix.
Syntax
IntlChar::forDigit(digit,radix )
Parameters
Digit − A number to convert to a character
Radix − The radix value. Default 10.
Return
The IntlChar::forDigit() function returns the character representation of specified digit in the specified radix.
Example
The following is an example −
<?php var_dump(IntlChar::forDigit(7)); echo "<br>"; var_dump(IntlChar::forDigit(5, 16)); echo "<br>"; var_dump(IntlChar::forDigit(0)); ?>
Output
The following is the output −
int(55) int(53) int(48)