title: Get response headers in PHP from vhost configuration
body: <p>I have a vhost configuration that has a directive to add a response header to every request, like this:</p>
  
  <p><code>Header append X-MyHeader "Info Stuff in here"</code></p>
  
  <p>If I run <code>phpinfo()</code> on this server, I see this header contained in the apache2handler section under the headline <em>HTTP Headers Information</em> as <em>HTTP Response Headers</em>. PHP seems to be able to access this info somehow.</p>
  
  <p>I tried <code>headers_list()</code> and <code>apache_response_headers()</code> to get this information for my script, but it is missing.</p>
  
  <p>A Google search did not come up with a solution, it seems like this to be a rare case. One other question here on SO got the answer to really query the server again and look at the headers, but I won't do this because I need the info on every request I serve - subrequests seem to be too much of a performance penalty.</p>
  
  <p>How does <code>phpinfo()</code> know the values?</p>
  
  <p>Update1: PHP does not show the value inside any of the superglobals like <code>$_SERVER</code>, <code>$_ENV</code> etc. The only place I see it on the phpinfo page is in the above mentioned section. Otherwise this would be a no-brainer.</p>