title: How can I prevent built in PHP functions from becoming namespaced?
body: <p>I'm new to PHP namespaces, what I have is:</p>
  
  <pre><code>namespace Foo\Bar;
  class JsonAssetRest{
      static function ini(){
          $headers = getallheaders(); 
      }
  }
  JsonAssetRest::ini();
  </code></pre>
  
  <p>And this is creating the error</p>
  
  <pre><code>Uncaught Error: Call to undefined function Foo\Bar\getallheaders() in /var/www/html/class JsonAssetRest.php
  </code></pre>
  
  <p>How do I use getallheaders() (the built in function) without getting this error?</p>
  
  <p>Edit: <strong>The issue was related to removing a library while I was converting my code to a namespaced class</strong>. Said library defined getallheaders for nginx. I was confused by the error message adding namespacing and thought that was the issue.</p>
  
  <p>Gonna leave this up in case someone else gets confused by the error while debugging. And because the comments have improved my understanding of namespacing in PHP.</p>
  
  <p>Edit2: <strong>In case someone stumbles upon this error and wants to know how to solve the actual problem</strong> (getallheaders not being defined under nginx), it's been answered here: <a href="https://stackoverflow.com/questions/13224615/get-the-http-headers-from-current-request-in-php">Get the http headers from current request in PHP</a></p>