;
}
}
//sprintf —— 返回格式化的字符串
return sprintf('%04X', $crc);
}
2、字符串转16...dechex(ord($str[$i])), 2, "0", STR_PAD_LEFT);
}
return strtoupper($hex);
}
3、10进制转16...strtoupper(base_convert($num,10,16));
return str_pad($str, 8, "0", STR_PAD_LEFT);
}
4、16进制转字符串...字符串替换
str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] ) : mixed
将字符串转换为数组...str_split ( string $string [, int $split_length = 1 ] ) : array
踩坑:16进制不能将一个大串直接转换为16进制,这样不是很准确,应该两位两位分开转换为