現(xiàn)在我接收到微信支付流水號(hào),如:4200001755202302223061147571
入庫(kù)也是正常的數(shù)據(jù)(庫(kù)里的數(shù)據(jù)也是一樣的),但查詢數(shù)據(jù)并打印輸出時(shí),發(fā)現(xiàn)轉(zhuǎn)換成 科學(xué)計(jì)數(shù)法 了,如:4.2000017552023E+27
如果用
if(false !== stripos($num, "e")){
$a = explode("e",strtolower($num));
//return bcmul($a[0], bcpow(10, $a[1]));
return bcmul($a[0], bcpow(10, $a[1]));
}
這樣再轉(zhuǎn)換一次的話,會(huì)丟掉了精度了,請(qǐng)問大大們有沒有什么好的辦法呢?