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

        if (null === $size) {
            return @fgets($this->fp);
        } else {
            return @fgets($this->fp, $size);
        }
    }
public function gets($size = null)
    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        }

        if (null === $size) {
            return @fgets($this->fp);
        } else {
            return @fgets($this->fp, $size);
        }
    }
public function gets ( $ size = null ) { if ( ! is_resource ( $ this -> fp ) ) { return $ this -> raiseError ( 'not connected' ) ; } if ( null === $ size ) { return @ fgets ( $ this -> fp ) ; } else { return @ fgets ( $ this -> fp , $ size ) ; } }
Get a specified line of data

@param int $size Reading ends when size - 1 bytes have been read,
or a newline or an EOF (whichever comes first).
If no size is specified, it will keep reading from
the stream until it reaches the end of the line.

@access public
@return mixed $size bytes of data from the socket, or a PEAR_Error if
not connected. If an error occurs, FALSE is returned.
Get a specified line of data