namespace test; class CString { //error compile public static function getRandom(int length, string keyspace = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") -> string { int i, nb, max; string ch; array pieces = []; let max = (int)mb_strlen(keyspace, "8bit") - 1; for i in range(0, length) { let nb = (int)random_int(0, max); let ch = keyspace[nb]; let pieces[] = ch; } return "test"; } //Unknown type: uchar public static function getRandom2(int length, string keyspace = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") -> string { int i, nb, max; char ch; array pieces = []; let max = (int)mb_strlen(keyspace, "8bit") - 1; for i in range(0, length) { let nb = (int)random_int(0, max); let ch = keyspace[nb]; let pieces[] = ch;//Unknown type: uchar } return "test"; } //Unknown type: uchar public static function getRandom3(int length, string keyspace = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") -> string { int i, nb, max; array pieces = []; let max = (int)mb_strlen(keyspace, "8bit") - 1; for i in range(0, length) { let nb = (int)random_int(0, max); let pieces[] = keyspace[nb];//Unknown type: uchar } return "test"; } }