PHP: Get HTTP Protocol Version (HTTP/1.1 vs HTTP/2)
<p>Until now my php application assumed HTTP 1.1 everywhere. So I defined all headers like so:</p>

<pre><code>header("HTTP/1.1 500 Internal Server Error"); 
</code></pre>

<p>But now my server also supports HTTP 2 and I want to update all header responses with the right HTTP status code.</p>

<p>How to I get the HTTP Protocol version of the http request? </p>

<p>(My webserver is nginx, but I guess it is irrelevant if I am using nginx or apache.)</p>