不常用,所以整理在这里,分享给同行使用

方法一:取尾数法

public function NumToStr($num) {
if (stripos($num, 'e') === false)
return $num;
$num = trim(preg_replace('/[=\'"]/', '', $num, ), '"'); //出现科学计数法,还原成字符串
$result = "";
while ($num > ) {
$v = $num - floor($num / ) * ;
$num = floor($num / );
$result = $v . $result;
}
return $result;
}

方法二:数字规律法

function sctonum($num){
if(false !== stripos($num, "e")){
$a = explode("e",strtolower($num));
return bcmul($a[], bcpow(, $a[]));
}
}
05-10 20:36