php 是否有内置的 base32 值转换?
我知道我可以使用 number_format,但是有没有办法表示 base32 数字?例如,十六进制可以用0x...来表示,八进制可以用前面的0来表示。 php中有什么可以表示base32数字的吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用内置函数base_convert。例如:
Use the built-in function base_convert. For example:
我从未见过 Base32 的原生表示法,但当然有
Base_convert( )
。I never seen a native notation for base32, but there is ofcourse
Base_convert()
.number_format()
不能用于“表示”基数 32 数字,我想知道您是否是指base_convert
(http://php.net/base_convert) 在基数之间移动,例如至于使用特殊前缀定义它们,据我所知 PHP 仅支持 0 和 0x对于八进制/十六进制。
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.