Net/Socket.php
public function readLine()
    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        }

        $line = '';

        $timeout = time() + $this->timeout;

        while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
            $line .= @fgets($this->fp, $this->lineLength);
            if (substr($line, -1) == "\n") {
                return rtrim($line, $this->newline);
            }
        }

        return $line;
    }
public function readLine()
    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        }

        $line = '';

        $timeout = time() + $this->timeout;

        while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
            $line .= @fgets($this->fp, $this->lineLength);
            if (substr($line, -1) == "\n") {
                return rtrim($line, $this->newline);
            }
        }

        return $line;
    }
public function readLine ( ) { if ( ! is_resource ( $ this -> fp ) ) { return $ this -> raiseError ( 'not connected' ) ; } $ line = '' ; $ timeout = time ( ) + $ this -> timeout ; while ( ! feof ( $ this -> fp ) && ( ! $ this -> timeout || time ( ) < $ timeout ) ) { $ line .= @ fgets ( $ this -> fp , $ this -> lineLength ) ; if ( substr ( $ line , - 1 ) == "\n" ) { return rtrim ( $ line , $ this -> newline ) ; } } return $ line ; }
Read until either the end of the socket or a newline, whichever
comes first. Strips the trailing newline from the returned data.

@access public
@return string All available data up to a newline, without that
newline, or until the end of the socket, or a PEAR_Error if
not connected.
Read until either the end of the socket or a newline whichever comes first . Strips the trailing newline from the returned data .