I can't remember what was the function that does this
<p>I remember there was a function in PHP where you can choose how many bits each character of a string represents (I dont remember if it was for converting string or for generating them).<br />
For example if you chose 4 bits per caracter then the output string would be formed by hexadecimal characters only (0-9 A-F). If you chose 5 bits per caracter then the output string will include more characters (not just hexadecimal ones) since the alphabet needs to have 32 characters (2^5); and if you chose 6 bits per charaters then an alphabet of 2^6=64 characters was used.<br />
Of course, the more bits per character you choose, the shorter the output string will be.</p>

<p>Does anyone know what I'm talking about??
I'm quite sure there was a built-in function for this in PHP, but I cant find it.</p>
