php生成8位0.1-0.3随机小数

代码2020-02-07736 人已阅来源:网络

php生成0.1-0.3随机小数代码:

number_format(0.1+mt_rand()/mt_getrandmax()*(0.3-0.1),8)