strin base_convert
(string number, int frombase, int tobase);number を基底 tobase で表した文字列を返します。 number の基底は、 frombase で指定します。 frombase および tobase は共に 2 〜 36 である必要があります。 10 より大きな基底を有する数の各桁は、文字 a-z で表されます。 この場合、a は 10、b は 11、z は 36 を意味します。
例 1. base_convert()
$binary = base_convert($hexadecimal, 16, 2);