feof

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Tests for end-of-file on a file pointer
<?php feof(resource $stream): bool
<?php     );



    while (true) {

        if (feof(STDIN)) {

            $application->end();

            exit;

        }
<?php         assert($fseek === 0);



        $contents = '';

        while (! feof($handle)) {

            $fread = fread($handle, 8192);

            assert($fread !== false);

            $contents .= $fread;
<?php     private function sendLongData(array $streams): void

    {

        foreach ($streams as $paramNr => $stream) {

            while (! feof($stream)) {

                $chunk = fread($stream, 8192);



                if ($chunk === false) {
<?php         $bh = fopen($b, 'rb');



        $result = true;

        while (!feof($ah)) {

            if (fread($ah, 8192) != fread($bh, 8192)) {

                $result = false;

                break;
<?php     protected function read($pipe, $name)

    {

        if (feof($pipe)) {

            return;

        }

        $line = fgets($pipe);
<?php             $d = $deferred;

            $deferred = null;



            if (\feof($socket) || $error === null) {


                $d->reject(new \UnexpectedValueException(

                    'Connection lost during TLS handshake (ECONNRESET)',
<?php                 if ($this->socket === $stream) {

                    $stream = stream_socket_accept($this->socket);

                    $sockets[(int) $stream] = $stream;

                } elseif (feof($stream)) {

                    unset($sockets[(int) $stream]);

                    fclose($stream);

                } else {