private function readFieldLength(string &$buffer): int
    {
        $block  = unpack('C4', $buffer);

        $length = $block[1];
        $skip   = 1;

        if ($length & 0x80) {
            $fullBlock = unpack('N', $buffer);
            $length    = $fullBlock[1] & 0x7FFFFFFF;
            $skip      = 4;
        }

        $buffer = substr($buffer, $skip);

        return $length;
    }
private function readFieldLength(string &$buffer): int
    {
        $block  = unpack('C4', $buffer);

        $length = $block[1];
        $skip   = 1;

        if ($length & 0x80) {
            $fullBlock = unpack('N', $buffer);
            $length    = $fullBlock[1] & 0x7FFFFFFF;
            $skip      = 4;
        }

        $buffer = substr($buffer, $skip);

        return $length;
    }
private function readFieldLength ( string & $ buffer ) : int { $ block = unpack ( 'C4' , $ buffer ) ; $ length = $ block [ 1 ] ; $ skip = 1 ; if ( $ length & 0x80 ) { $ fullBlock = unpack ( 'N' , $ buffer ) ; $ length = $ fullBlock [ 1 ] & 0x7FFFFFFF ; $ skip = 4 ; } $ buffer = substr ( $ buffer , $ skip ) ; return $ length ; }
Read the field length of a FastCGI name-value pair from a buffer.

@param string $buffer The buffer to read the field length from (pass by reference)

@return int The length of the field
Read the field length of a FastCGI name - value pair from a buffer .