title: Problem with calling function with Alto Router package in PHP
body: <p>I have a problem with calling function using alto routing. On index.php I I have my route that calls function that is in another file (test.php) and those two files are in the same directory (root). I get no response, but when I put that function from test.php to index.php where are my routes then it works and I need that function to work in test.php file. I tried putting 'require(index.php)' in test.php file but it doesn't work. Any help is appreciated if someone knows workaround for this. Here is my code.</p>
  <p>index.php</p>
  <pre><code>&lt;?php
  
  require 'vendor/autoload.php';
  
  $router = new AltoRouter();
  
  $router-&gt;map('GET','/test', 'test.php', 'testfunction'); // HERE IS THAT ROUTE!!!
  
  $match = $router-&gt;match();
  
  if ( is_array($match) &amp;&amp; is_callable( $match['target'] ) ) {
      call_user_func_array( $match['target'], $match['params'] ); 
  } else {
      header( $_SERVER[&quot;SERVER_PROTOCOL&quot;] . ' 404 Not Found');
  }
  </code></pre>
  <p>test.php</p>
  <pre><code>&lt;?php
  
  require 'index.php';
  
  function testfunction()
  {
      echo &quot;YES IT WORKS!&quot;;
  }
  </code></pre>