final public static function unpack(string $data): self
    {
        $self = new static();
        [
            $self->version,
            $self->type,
            $self->requestId,
            $self->contentLength,
            $self->paddingLength,
            $self->reserved
        ] = array_values(unpack(FCGI::HEADER_FORMAT, $data));

        $payload = substr($data, FCGI::HEADER_LEN);
        self::unpackPayload($self, $payload);
        if (get_called_class() !== __CLASS__ && $self->contentLength > 0) {
            static::unpackPayload($self, $payload);
        }

        return $self;
    }
final public static function unpack(string $data): self
    {
        $self = new static();
        [
            $self->version,
            $self->type,
            $self->requestId,
            $self->contentLength,
            $self->paddingLength,
            $self->reserved
        ] = array_values(unpack(FCGI::HEADER_FORMAT, $data));

        $payload = substr($data, FCGI::HEADER_LEN);
        self::unpackPayload($self, $payload);
        if (get_called_class() !== __CLASS__ && $self->contentLength > 0) {
            static::unpackPayload($self, $payload);
        }

        return $self;
    }
final public static function unpack ( string $ data ) : self { $ self = new static ( ) ; [ $ self -> version , $ self -> type , $ self -> requestId , $ self -> contentLength , $ self -> paddingLength , $ self -> reserved ] = array_values ( unpack ( FCGI :: HEADER_FORMAT , $ data ) ) ; $ payload = substr ( $ data , FCGI :: HEADER_LEN ) ; self :: unpackPayload ( $ self , $ payload ) ; if ( get_called_class ( ) !== __CLASS__ && $ self -> contentLength > 0 ) { static :: unpackPayload ( $ self , $ payload ) ; } return $ self ; }
Unpacks the message from the binary data buffer

@param string $data Binary buffer with raw data

@return static
Unpacks the message from the binary data buffer