Php – Does php have a built in coversion to base32 values

base32PHP

I know I can use number_format, but is there a way to represent base32 numbers? For example, hex can be represented with 0x… and octal can be represented with a 0 in the front. Is there anything to represent base32 numbers in php?

Best Answer

Use the built-in function base_convert. For example:

// To convert from base 10 to base 32:
echo( base_convert( 12345, 10, 32 ) );