title: Kohana3 Function name must be a string exception in Route class
body: <p>I have the following code in <em>Welcome_Controller action_index</em> method:</p>
  
  <pre><code>$route = new Route('(&lt;controller&gt;(/&lt;action&gt;(/&lt;id&gt;)))');
  $body = $route-&gt;uri(array(
    'controller' =&gt; 'welcome',
    'action'     =&gt; 'index',
    'id'         =&gt; '10'
  ));
  echo Debug::vars($body);
  </code></pre>
  
  <p>When <em>$route->uri</em> method is called, I am getting an error:  </p>
  
  <blockquote>
    <p>ErrorException [ Fatal Error ]: Function name must be a string in SYSPATH/classes/Kohana/Route.php [ 589 ]</p>
  </blockquote>
  
  <pre><code>584             }
  585 
  586             return array($result, $required);
  587         };
  588 
  589         list($uri) = $compile($this-&gt;_uri, TRUE);
  590 
  591         // Trim all extra slashes from the URI
  592         $uri = preg_replace('#//+#', '/', rtrim($uri, '/'));
  593 
  594         if ($this-&gt;is_external())
  </code></pre>
  
  <p>Why am I getting this error? According to Kohana <em>install.php</em> file, my environment passed all requirements. </p>
  
  <p><em>$compile</em> is an <strong><em>anonymous function</em></strong>, but according to <a href="http://php.net/manual/en/functions.anonymous.php" rel="nofollow">PHP Manual</a> there were introduced in <strong>PHP 5.3.0</strong> version, which I have on my hosting environment. Maybe there is an option to enable/disable <strong><em>anonymous functions</em></strong> in PHP?</p>
  
  <p>You can find whole code here: <a href="https://github.com/DamianKedzior/kohana/tree/3.3/route_uri_exception" rel="nofollow">https://github.com/DamianKedzior/kohana/tree/3.3/route_uri_exception</a></p>