<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.stream.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.stream-get-line.php',
    1 => 'stream_get_line',
    2 => 'Gets line from stream resource up to a given delimiter',
  ),
  'up' => 
  array (
    0 => 'ref.stream.php',
    1 => 'Stream Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.stream-get-filters.php',
    1 => 'stream_get_filters',
  ),
  'next' => 
  array (
    0 => 'function.stream-get-meta-data.php',
    1 => 'stream_get_meta_data',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/functions/stream-get-line.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.stream-get-line" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">stream_get_line</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">stream_get_line</span> &mdash; <span class="dc-title">Gets line from stream resource up to a given delimiter</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.stream-get-line-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>stream_get_line</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$stream</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$length</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$ending</code><span class="initializer"> = &quot;&quot;</span></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Gets a line from the given handle.
  </p>
  <p class="para">
   Reading ends when <code class="parameter">length</code> bytes have been read, when
   the non-empty string specified by <code class="parameter">ending</code> is found (which is
   <em>not</em> included in the return value), or on <abbr title="End Of File">EOF</abbr>
   (whichever comes first).
  </p>
  <p class="para">
   This function is nearly identical to <span class="function"><a href="function.fgets.php" class="function">fgets()</a></span> except in
   that it allows end of line delimiters other than the standard \n, \r, and
   \r\n, and does <em>not</em> return the delimiter itself.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.stream-get-line-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">stream</code></dt>
     <dd>
      <p class="para">
       A valid file handle.
      </p>
     </dd>
    
    
     <dt><code class="parameter">length</code></dt>
     <dd>
      <p class="para">
       The maximum number of bytes to read from the handle.
       Negative values are not supported.
       Zero (<code class="literal">0</code>) means the default socket chunk size,
       i.e. <code class="literal">8192</code> bytes.
      </p>
     </dd>
    
    
     <dt><code class="parameter">ending</code></dt>
     <dd>
      <p class="para">
       An optional string delimiter.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.stream-get-line-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Returns a string of up to <code class="parameter">length</code> bytes read from the file
   pointed to by <code class="parameter">stream</code>, o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>

  
 <div class="refsect1 seealso" id="refsect1-function.stream-get-line-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.fread.php" class="function" rel="rdfs-seeAlso">fread()</a> - Legge un file salvaguardando la corrispondenza binaria</span></li>
   <li><span class="function"><a href="function.fgets.php" class="function" rel="rdfs-seeAlso">fgets()</a> - Prende una riga da un puntatore a file</span></li>
   <li><span class="function"><a href="function.fgetc.php" class="function" rel="rdfs-seeAlso">fgetc()</a> - Prende un carattere da un puntatore a file</span></li>
  </ul>
 </div>


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