private function readNameValuePair(int $requestId, ?string &$buffer): void
    {
        $nameLength  = $this->readFieldLength($buffer);
        $valueLength = $this->readFieldLength($buffer);

        $contentFormat = (
            'a'.$nameLength.'name/'.
            'a'.$valueLength.'value/'
        );

        $content = unpack($contentFormat, $buffer);
        $this->requests[$requestId]['params'][$content['name']] = $content['value'];

        $buffer = substr($buffer, $nameLength + $valueLength);
    }
private function readNameValuePair(int $requestId, ?string &$buffer): void
    {
        $nameLength  = $this->readFieldLength($buffer);
        $valueLength = $this->readFieldLength($buffer);

        $contentFormat = (
            'a'.$nameLength.'name/'.
            'a'.$valueLength.'value/'
        );

        $content = unpack($contentFormat, $buffer);
        $this->requests[$requestId]['params'][$content['name']] = $content['value'];

        $buffer = substr($buffer, $nameLength + $valueLength);
    }
private function readNameValuePair ( int $ requestId , ? string & $ buffer ) : void { $ nameLength = $ this -> readFieldLength ( $ buffer ) ; $ valueLength = $ this -> readFieldLength ( $ buffer ) ; $ contentFormat = ( 'a' . $ nameLength . 'name/' . 'a' . $ valueLength . 'value/' ) ; $ content = unpack ( $ contentFormat , $ buffer ) ; $ this -> requests [ $ requestId ] [ 'params' ] [ $ content [ 'name' ] ] = $ content [ 'value' ] ; $ buffer = substr ( $ buffer , $ nameLength + $ valueLength ) ; }
Read a FastCGI name-value pair from a buffer and add it to the request params.

@param int    $requestId The request id that sent the name-value pair
@param null|string $buffer    The buffer to read the pair from (pass by reference)
Read a FastCGI name - value pair from a buffer and add it to the request params .