<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.splfileobject.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'splfileobject.eof.php',
    1 => 'SplFileObject::eof',
    2 => 'Comprueba si es el final del fichero',
  ),
  'up' => 
  array (
    0 => 'class.splfileobject.php',
    1 => 'SplFileObject',
  ),
  'prev' => 
  array (
    0 => 'splfileobject.current.php',
    1 => 'SplFileObject::current',
  ),
  'next' => 
  array (
    0 => 'splfileobject.fflush.php',
    1 => 'SplFileObject::fflush',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/spl/splfileobject/eof.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="splfileobject.eof" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SplFileObject::eof</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SplFileObject::eof</span> &mdash; <span class="dc-title">Comprueba si es el final del fichero</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-splfileobject.eof-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SplFileObject::eof</strong></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Determina si el final de el fichero ha sido alcanzado.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-splfileobject.eof-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">Esta función no contiene ningún parámetro.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-splfileobject.eof-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Devuelve <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> si es el final de el fichero, en caso contrario <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-splfileobject.eof-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo de <span class="methodname"><strong>SplFileObject::eof()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$fichero </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileObject</span><span style="color: #007700">(</span><span style="color: #DD0000">"frutas.txt"</span><span style="color: #007700">);<br />while ( ! </span><span style="color: #0000BB">$fichero</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">eof</span><span style="color: #007700">()) {<br />    echo </span><span style="color: #0000BB">$fichero</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fgets</span><span style="color: #007700">();<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Resultado del ejemplo anterior es similar a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">manzana
banana
cereza
naranja
baya</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-splfileobject.eof-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="splfileobject.valid.php" class="methodname" rel="rdfs-seeAlso">SplFileObject::valid()</a> - Comprueba si el final del finchero ha sido alcanzado</span></li>
    <li><span class="function"><a href="function.feof.php" class="function" rel="rdfs-seeAlso">feof()</a> - Prueba el final del archivo</span></li>
   </ul>
  </p>
 </div>


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