PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<bindeccos>
Last updated: Mon, 16 Jul 2012

ceil

(PHP 3, PHP 4, PHP 5)

ceil -- 进一法取整

说明

float ceil ( float value )

返回不小于 value 的下一个整数,value 如果有小数部分则进一位。ceil() 返回的类型仍然是 float,因为 float 值的范围通常比 integer 要大。

例子 1. ceil() 例子

<?php
echo ceil(4.3);    // 5
echo ceil(9.999);  // 10
?>

参见 floor()round()




<bindeccos>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST