左边用0填充补齐 有时候我们为了将数字对齐,好看,就在前面补0对齐 <?php $temp = 10000000;//8位 $num = 11; $num = $temp+$num; $num = substr($temp,6,4);//结果0011 ?>