WordPress at a glance
function is not described

Requests_IDNAEncoder::digit_to_char() protected WP 1.0

Convert a digit to its respective character

{} It's a method of the class: Requests_IDNAEncoder{}

No Hooks.


String. Single character corresponding to digit


$result = Requests_IDNAEncoder::digit_to_char( $digit );
$digit(int) (required)
Digit in the range 0-35


Code of Requests_IDNAEncoder::digit_to_char() WP 5.7.2

protected static function digit_to_char($digit) {
	// @codeCoverageIgnoreStart
	// As far as I know, this never happens, but still good to be sure.
	if ($digit < 0 || $digit > 35) {
		throw new Requests_Exception(sprintf('Invalid digit %d', $digit), 'idna.invalid_digit', $digit);
	// @codeCoverageIgnoreEnd
	$digits = 'abcdefghijklmnopqrstuvwxyz0123456789';
	return substr($digits, $digit, 1);