小白教程
所有教程
关于
Search
172.71.255.11
172.71.255.11
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Func math floor”的源代码
本页内容
上一节:
Func_math_expm1
下一节:
Func_math_fmod
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:floor()}}[[Category:PHP Math 数学函数参考手册|20]] = PHP floor() 函数 = [[:Category:PHP Math 数学函数参考手册]] 向下舍入为最接近的整数: <sample title="" desc="" lang="php" hererun="1"> <?php echo(floor(0.60) . "<br>"); echo(floor(0.40) . "<br>"); echo(floor(5) . "<br>"); echo(floor(5.1) . "<br>"); echo(floor(-5.1) . "<br>"); echo(floor(-5.9)); ?> </sample> == 定义和用法 == floor() 函数向下舍入为最接近的整数。 '''提示:'''如需向上舍入为最接近的整数,请查看 [[func math ceil|ceil()]] 函数。 '''提示:'''如需对浮点数进行四舍五入,请查看 [[func math round|round()]] 函数。 == 语法 == <pre> floor(number);</pre> {| class="table table-striped table-hover" ! 参数 ! 描述 |- | number | 必需。规定需向下取整的值。 |} == 技术细节 == {| class="table table-striped table-hover" | 返回值: | 向下舍入的最接近的整数值。 |- | 返回类型: | Float |- | PHP 版本: | 4+ |} [[:Category:PHP Math 数学函数参考手册]]
返回至“
Func math floor
”。
上一节:
Func_math_expm1
下一节:
Func_math_fmod