PHP rounding problem (5.2.3)?

前端 未结 3 1418
时光取名叫无心
时光取名叫无心 2021-01-12 11:10

I\'m wondering if I found an issue with the rounding in PHP, specifically 5.2.3 (I\'m not sure about other versions at the moment):

$t = 0;

$taxAmount = (5.         


        
3条回答
  •  有刺的猬
    2021-01-12 11:45

    You can use PHP_ROUND_HALF_UP, but there's a issue that number self transform to "99999..."

提交回复
热议问题