public static function decToHex($dec, $length = 0)
    {
        $gmp = gmp_init($dec, 10);
        $hex = gmp_strval($gmp, 16);

        return self::pad($hex, $length);
    }
public static function decToHex($dec, $length = 0)
    {
        $gmp = gmp_init($dec, 10);
        $hex = gmp_strval($gmp, 16);

        return self::pad($hex, $length);
    }
public static function decToHex ( $ dec , $ length = 0 ) { $ gmp = gmp_init ( $ dec , 10 ) ; $ hex = gmp_strval ( $ gmp , 16 ) ; return self :: pad ( $ hex , $ length ) ; }
Converts decimal string into hexadecimal string.

@param string $dec    Decimal string.
@param int    $length Minimum output length.

@return string Hexadecimal string.
Converts decimal string into hexadecimal string .