Convert binary to hexadecimal using PHP

前端 未结 4 1711
鱼传尺愫
鱼传尺愫 2021-01-28 15:06

How do I convert a binary number (i.e. 1111111) to hexadecimal (i.e. 7f) using PHP? I recognize I could do dechex(bindec(\'1111111\'));, h

4条回答
  •  情深已故
    2021-01-28 15:16

    try this:

    
    

    look at this link for more info http://php.net/manual/en/function.bin2hex.php

提交回复
热议问题