Home >Backend Development >PHP Tutorial >如何把4字节数字转为16进制

如何把4字节数字转为16进制

WBOY
WBOYOriginal
2016-06-13 12:04:183664browse

怎么把4字节数字转为16进制?
我只知道dechex函数,但转出来是 

<br />echo dechex(1407401322869);<br />

afa7e975

计算器选四字节出来的结果147afa82c60 才是我要的结果

请问怎么用PHP实现?
------解决方案--------------------
你那是什么计算器?
应该是 147AFA7E975
echo base_convert(1407401322869, 10, 16); //147afa7e975<br />

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn