gzeof

Syntax

int gzeof ( resource zp )

Popis

Príkaz jazyka PHP
Tests the given GZ file pointer for EOF (end-of-file).

zp - 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.

Príklad

<?php
$gz = gzopen('somefile.gz', 'r');
while (!gzeof($gz)) {
  echo gzgetc($gz);
}
gzclose($gz);
?>