函数:Floor()


Floor

计算小于指定数的最大整数。

语法: int floor(float number);

返回值: 整数

函数种类: 数学运算

内容说明

本函数用来计算比浮点参数 number 小的最大整数。

使用范例

本例返回值为 3。

<?php
$lastint
=floor(3.14);
echo 
$lastint;
?>

参考

Ceil()  round()  



[ 上一页 PHP 手册 下一页 ]

PHP 首页 | PHP 导读 | PHP 函数库 | PHP 函数索引 | PHP 范例程序