array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.ceil.php', 1 => 'ceil', ), 'up' => array ( 0 => 'ref.math.php', 1 => 'Math 函数', ), 'prev' => array ( 0 => 'function.bindec.php', 1 => 'bindec', ), 'next' => array ( 0 => 'function.cos.php', 1 => 'cos', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/math/functions/ceil.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
ceil — 进一法取整
num
要进一法取整的值
版本 | 说明 |
---|---|
8.0.0 |
num 不再接受支持数字转换的内部对象。
|
示例 #1 ceil() 示例
<?php
echo ceil(4.3); // 5
echo ceil(9.999); // 10
echo ceil(-3.14); // -3
?>