💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
``` ~~~ /** * @param $num * @param int $t * @return float|int */ function RoundTwo($num, $t = 2) { switch ($t) { case 1: $pre = 10; break; case 3: $pre = 1000; break; case 4: $pre = 10000; break; case 5: $pre = 100000; break; default : $pre = 100; break; } return floor($num * $pre) / $pre; } ~~~ ```