private function readBoundaryLine($handle, &$lineSeparatorLength = 0)
    {
        $size = 2048;
        $isCut = false;
        $line = fgets($handle, $size);
        while (strlen($line) === $size - 1 && substr($line, -1) !== "\n") {
            $line = fgets($handle, $size);
            $isCut = true;
        }
        $ret = rtrim($line, "\r\n");
        $lineSeparatorLength = strlen($line) - strlen($ret);
        return ($isCut) ? '' : $ret;
    }
private function readBoundaryLine($handle, &$lineSeparatorLength = 0)
    {
        $size = 2048;
        $isCut = false;
        $line = fgets($handle, $size);
        while (strlen($line) === $size - 1 && substr($line, -1) !== "\n") {
            $line = fgets($handle, $size);
            $isCut = true;
        }
        $ret = rtrim($line, "\r\n");
        $lineSeparatorLength = strlen($line) - strlen($ret);
        return ($isCut) ? '' : $ret;
    }
private function readBoundaryLine ( $ handle , & $ lineSeparatorLength = 0 ) { $ size = 2048 ; $ isCut = false ; $ line = fgets ( $ handle , $ size ) ; while ( strlen ( $ line ) === $ size - 1 && substr ( $ line , - 1 ) !== "\n" ) { $ line = fgets ( $ handle , $ size ) ; $ isCut = true ; } $ ret = rtrim ( $ line , "\r\n" ) ; $ lineSeparatorLength = strlen ( $ line ) - strlen ( $ ret ) ; return ( $ isCut ) ? '' : $ ret ; }
Reads a line of 2048 characters.  If the line is larger than that, the
remaining characters in the line are read and
discarded, and only the first part is returned.

This method is identical to readLine, except it calculates the number of
characters that make up the line's new line characters (e.g. 2 for "\r\n"
or 1 for "\n").

@param resource $handle
@param int $lineSeparatorLength
@return string
Reads a line of 2048 characters . If the line is larger than that the remaining characters in the line are read and discarded and only the first part is returned .