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\'));
dechex(bindec($binary));
It is the right way, you are putting extra ")"(Closing Parenthesis) in the end...
Reference: http://php.net/manual/en/function.bin2hex.php