gets() публичный Метод

Returns a line of data.
public gets ( integer $size ) : string
$size integer Reading ends when $size - 1 bytes have been read, or a newline or an EOF (whichever comes first).
Результат string $size bytes of data from the socket
Пример #1
0
 /**
  * Receives a single line from the server.
  *
  * @return string  The server response line.
  */
 protected function _recvLn()
 {
     $lastline = rtrim($this->_sock->gets(8192));
     $this->_debug("S: {$lastline}");
     if ($lastline === '') {
         throw new Exception('Failed to read from socket');
     }
     return $lastline;
 }