title: Are global variables in PHP considered bad practice? If so, why?
body: <pre><code>function foo () {
      global $var;
      // rest of code
  }
  </code></pre>
  
  <p>In my small PHP projects I usually go the procedural way. I generally have a variable that contains the system configuration, and when I nead to access this variable in a function, I do <code>global $var;</code>.</p>
  
  <p>Is this bad practice?</p>