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
1111111
7f
dechex(bindec(\'1111111\'));
You can also try this function: