src/ServerRequestFactory.php
private static function aggregateHttpProtocolVersionFromServer($server)
    {
        if (!isset($server['SERVER_PROTOCOL'])) {
            return null;
        }

        $pattern = '/^(?P<scheme>HTTP)\/(?P<protocol_version>1\.(0|1))$/';

        if (!preg_match($pattern, $server['SERVER_PROTOCOL'], $q)) {
            return null;
        }

        return $q['protocol_version'];
    }
private static function aggregateHttpProtocolVersionFromServer($server)
    {
        if (!isset($server['SERVER_PROTOCOL'])) {
            return null;
        }

        $pattern = '/^(?P<scheme>HTTP)\/(?P<protocol_version>1\.(0|1))$/';

        if (!preg_match($pattern, $server['SERVER_PROTOCOL'], $q)) {
            return null;
        }

        return $q['protocol_version'];
    }
private static function aggregateHttpProtocolVersionFromServer ( $ server ) { if ( ! isset ( $ server [ 'SERVER_PROTOCOL' ] ) ) { return null ; } $ pattern = '/^(?P<scheme>HTTP)\/(?P<protocol_version>1\.(0|1))$/' ; if ( ! preg_match ( $ pattern , $ server [ 'SERVER_PROTOCOL' ] , $ q ) ) { return null ; } return $ q [ 'protocol_version' ] ; }
Get HTTP protocol version from server variables.

@param $server The server variables.
@return string
Get HTTP protocol version from server variables .