title: global variables in php not working
body: <p>As per example below, I would expect the ouput to be "test value", why do I get "0" instead?</p>
  
  <p><em>File main.php</em></p>
  
  <pre><code>&lt;?php
  include_once 'functions.php';
  $var = '0'; 
  test();
  echo $var; 
  ?&gt;
  </code></pre>
  
  <p><em>File functions.php</em></p>
  
  <pre><code>&lt;?php 
  function test()
  {
      global $var;
      $var = 'test value';
  }
  ?&gt;
  </code></pre>