protected function readStream(&$stream, &$output) {
    $content = stream_get_contents($stream);
    if (strlen(rtrim($content))) {
      foreach (preg_split('/\r?\n/', $content) as $line) {
        $output[] = $line;
      }
    }
  }
protected function readStream(&$stream, &$output) {
    $content = stream_get_contents($stream);
    if (strlen(rtrim($content))) {
      foreach (preg_split('/\r?\n/', $content) as $line) {
        $output[] = $line;
      }
    }
  }
protected function readStream ( & $ stream , & $ output ) { $ content = stream_get_contents ( $ stream ) ; if ( strlen ( rtrim ( $ content ) ) ) { foreach ( preg_split ( '/\r?\n/' , $ content ) as $ line ) { $ output [ ] = $ line ; } } }
Read stream content to output array

@param resource $stream Stream resource
@param array $output
Read stream content to output array