title: PHP - Weird behaviour after calling functions in a map
body: <p>I'm experiencing quite a strange reaction from the browser when invoking this PHP script.</p>
  
  <pre><code>&lt;?php
      $map = array(
          'a' =&gt; function(){
                  print_r('a');
              },
  
          'b' =&gt; function(){
                  print_r('b');
              }
      );  
      $map($_GET['v']);
  ?&gt;
  </code></pre>
  
  <p>I already noticed that there is a mistake there. The syntax of the call is wrong, as it should be like this:</p>
  
  <pre><code>$map[$_GET['v']]();
  </code></pre>
  
  <p>The thing is that the reaction of the browser to this mistake is not what it should be.</p>
  
  <p>The result of running this script is a 'The connection was reset' message. The server is up and running correctly, as other PHP files (and this one after correcting the mistake) run perfectly.</p>
  
  <p>But what is actually puzzling me is what the navigation bar of the browser does. When I punch in the URL </p>
  
  <pre><code>localhost/cerdo.php?v=a
  </code></pre>
  
  <p>the content of the bar changes to </p>
  
  <pre><code>www.localhost.com/cerdo.php?v=a
  </code></pre>
  
  <p>The www.localhost.com part seems to happen only in Firefox. I've tried it on Chromium and, despite showing a similar message ('No data received') the URL stays the same.</p>
  
  <p>What is happening? Does this make any sense? Shouldn't PHP be reporting a syntax error? And why on earth would Firefox redirect to www.localhost.com?</p>