<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.math.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.ceil.php',
    1 => 'ceil',
    2 => 'Redondea al n&uacute;mero superior',
  ),
  'up' => 
  array (
    0 => 'ref.math.php',
    1 => 'Funciones Matem&aacute;ticas',
  ),
  'prev' => 
  array (
    0 => 'function.bindec.php',
    1 => 'bindec',
  ),
  'next' => 
  array (
    0 => 'function.cos.php',
    1 => 'cos',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/math/functions/ceil.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ceil" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ceil</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ceil</span> &mdash; <span class="dc-title">Redondea al número superior</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.ceil-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ceil</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.float.php" class="type float">float</a></span></span> <code class="parameter">$num</code></span>): <span class="type"><a href="language.types.float.php" class="type float">float</a></span></div>

  <p class="simpara">
   Devuelve el entero superior del número <code class="parameter">num</code>.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.ceil-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">num</code></dt>
     <dd>
      <p class="para">
       El valor a redondear
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.ceil-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   El valor <code class="parameter">num</code> redondeado al entero superior.
   El valor devuelto es un número de punto flotante
   (<span class="type"><a href="language.types.float.php" class="type float">float</a></span>), ya que el intervalo de valores de un <span class="type"><a href="language.types.float.php" class="type float">float</a></span> es generalmente
   más amplio que el de un <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.ceil-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">num</code> ya no acepta objetos internos que soportan
       las conversiones numéricas.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.ceil-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo con <span class="function"><strong>ceil()</strong></span></strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">ceil</span><span style="color: #007700">(</span><span style="color: #0000BB">4.3</span><span style="color: #007700">), </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;    </span><span style="color: #FF8000">// 5<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">ceil</span><span style="color: #007700">(</span><span style="color: #0000BB">9.999</span><span style="color: #007700">), </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;  </span><span style="color: #FF8000">// 10<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">ceil</span><span style="color: #007700">(-</span><span style="color: #0000BB">3.14</span><span style="color: #007700">), </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;  </span><span style="color: #FF8000">// -3<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.ceil-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.floor.php" class="function" rel="rdfs-seeAlso">floor()</a> - Redondea hacia el entero inferior</span></li>
    <li><span class="function"><a href="function.round.php" class="function" rel="rdfs-seeAlso">round()</a> - Redondea un n&uacute;mero de punto flotante</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>