Base83
in package
Table of Contents
Properties
- $characters : array<int, string>
- Base 63 encoder/decoder character set.
- $indexMap : array<int|string, int<0, 82>>
- Base 63 encoder/decoder character index map.
Methods
Properties
$characters
Base 63 encoder/decoder character set.
public
static array<int, string>
$characters
= ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '#', '$', '%', '*', '+', ',', '-', '.', ':', ';', '=', '?', '@', '[', ']', '^', '_', '{', '|', '}', '~']
$indexMap
Base 63 encoder/decoder character index map.
protected
static array<int|string, int<0, 82>>
$indexMap
= ['0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9, 'A' => 10, 'B' => 11, 'C' => 12, 'D' => 13, 'E' => 14, 'F' => 15, 'G' => 16, 'H' => 17, 'I' => 18, 'J' => 19, 'K' => 20, 'L' => 21, 'M' => 22, 'N' => 23, 'O' => 24, 'P' => 25, 'Q' => 26, 'R' => 27, 'S' => 28, 'T' => 29, 'U' => 30, 'V' => 31, 'W' => 32, 'X' => 33, 'Y' => 34, 'Z' => 35, 'a' => 36, 'b' => 37, 'c' => 38, 'd' => 39, 'e' => 40, 'f' => 41, 'g' => 42, 'h' => 43, 'i' => 44, 'j' => 45, 'k' => 46, 'l' => 47, 'm' => 48, 'n' => 49, 'o' => 50, 'p' => 51, 'q' => 52, 'r' => 53, 's' => 54, 't' => 55, 'u' => 56, 'v' => 57, 'w' => 58, 'x' => 59, 'y' => 60, 'z' => 61, '#' => 62, '$' => 63, '%' => 64, '*' => 65, '+' => 66, ',' => 67, '-' => 68, '.' => 69, ':' => 70, ';' => 71, '=' => 72, '?' => 73, '@' => 74, '[' => 75, ']' => 76, '^' => 77, '_' => 78, '{' => 79, '|' => 80, '}' => 81, '~' => 82]
Methods
decode()
Decode a string to integer.
public
static decode(string $encoded) : int
Parameters
- $encoded : string
Return values
intencode()
Encode an integer to string.
public
static encode(int $value, int $length) : string
Parameters
- $value : int
- $length : int