16进制转8进制
<?php $hex = "E196"; echo base_convert($hex,16,8); ?>
8进制数转换为10进制数
<?php $oct = "0031"; echo base_convert($oct,8,10); ?>
8进制数转换为16进制数
<?php $oct = "364"; echo base_convert($oct,8,16); ?>
https://www.runoob.com/php/func-math-base-convert.html