array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.gzeof.php', 1 => 'gzeof', ), 'up' => array ( 0 => 'ref.zlib.php', 1 => 'Zlib Functions', ), 'prev' => array ( 0 => 'function.gzencode.php', 1 => 'gzencode', ), 'next' => array ( 0 => 'function.gzfile.php', 1 => 'gzfile', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/zlib/functions/gzeof.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
gzeof — Test for EOF on a gz-file pointer
stream
The gz-file pointer. It must be valid, and must point to a file successfully opened by gzopen().
Returns true
if the gz-file pointer is at EOF or an error occurs;
otherwise returns false
.
Example #1 gzeof() example
<?php
$gz = gzopen('somefile.gz', 'r');
while (!gzeof($gz)) {
echo gzgetc($gz);
}
gzclose($gz);
?>