title: PHP: difference between getenv() and apache_getenv()
body: <p>I'm using an Apache 2 server and hosting a web app there. I'm setting some environment variables in my vhost by using the Apache <code>SetEnv VARIABLE value</code> command.</p>
  
  <p>When looking to retrieve the value in PHP, I've some across two methods. <a href="http://php.net/manual/en/function.getenv.php" rel="nofollow"><code>getenv()</code></a> and <a href="http://php.net/manual/en/function.apache-getenv.php" rel="nofollow"><code>apache_getenv()</code></a>.</p>
  
  <p>Is there any real difference? Is there a reason to prefer one over the other? Not sure what the point of have the <code>apache_getenv()</code> method is if <code>getenv()</code> works the same and allows your code to be server agnostic.</p>