<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.zlib.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.gzgetc.php',
    1 => 'gzgetc',
    2 => 'Get character from gz-file pointer',
  ),
  'up' => 
  array (
    0 => 'ref.zlib.php',
    1 => 'Zlib 函数',
  ),
  'prev' => 
  array (
    0 => 'function.gzfile.php',
    1 => 'gzfile',
  ),
  'next' => 
  array (
    0 => 'function.gzgets.php',
    1 => 'gzgets',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/zlib/functions/gzgetc.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.gzgetc" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gzgetc</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">gzgetc</span> &mdash; <span class="dc-title">Get character from gz-file pointer</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.gzgetc-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gzgetc</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="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">
   Returns a string containing a single (uncompressed) character
   read from the given gz-file pointer.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.gzgetc-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">stream</code></dt>
     <dd>
      <p class="para">
       The gz-file pointer. It must be valid, and must point to a file
       successfully opened by <span class="function"><a href="function.gzopen.php" class="function">gzopen()</a></span>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.gzgetc-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The uncompressed character or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on <abbr title="End Of File">EOF</abbr> (unlike <span class="function"><a href="function.gzeof.php" class="function">gzeof()</a></span>).
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.gzgetc-examples">
  <h3 class="title">示例</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>示例 #1 <span class="function"><strong>gzgetc()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$gz </span><span style="color: #007700">= </span><span style="color: #0000BB">gzopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'somefile.gz'</span><span style="color: #007700">, </span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br />while (!</span><span style="color: #0000BB">gzeof</span><span style="color: #007700">(</span><span style="color: #0000BB">$gz</span><span style="color: #007700">)) {<br />  echo </span><span style="color: #0000BB">gzgetc</span><span style="color: #007700">(</span><span style="color: #0000BB">$gz</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">gzclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$gz</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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

 <div class="refsect1 seealso" id="refsect1-function.gzgetc-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.gzopen.php" class="function" rel="rdfs-seeAlso">gzopen()</a> - Open gz-file</span></li>
    <li><span class="function"><a href="function.gzgets.php" class="function" rel="rdfs-seeAlso">gzgets()</a> - Get line from file pointer</span></li>
   </ul>
  </p>
 </div>

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