sprintf(‘%.2f‘,$a) //强大的格式化函数 //结果为字符串 //小数点位数不够,填充0
格式化函数 , 保留指定位数小数
原文:https://www.cnblogs.com/pansidong/p/11605939.html