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?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
I never seen a native notation for base32, but there is ofcourse
Base_convert()
.Use the built-in function base_convert. For example:
number_format()
cannot be used to 'represent' a base 32 number, I wonder if you meanbase_convert
(http://php.net/base_convert) to move between bases, e.g.As for defining them with a special prefix, as far as I'm aware PHP only supports 0 and 0x for octal/hexadecimal.