title: Fatal error: Method name must be a string
body: <p>I'm getting error:</p>
  
  <blockquote>
    <p>Fatal error: Method name must be a string in C:\xampp\htdocs\index.php on line 15"</p>
  </blockquote>
  
  <p>LINE 15: </p>
  
  <pre><code>$obj = new $url[0]();
  </code></pre>
  
  <p>CODE:</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL ^ E_NOTICE);
  
  $url = $_GET['url'];
  $url = explode('/', $url);
  
  if (!file_exists('controllers/' . $url[0] . '.php')) {
      $url[0] = 'error';   // error kontroleris 
  }    
  require 'controllers/' . $url[0] . '.php';
  
  $obj = new $url[0]();
  $obj-&gt;$url[1]();
  </code></pre>
  
  <p>BTW.: Script is not finished yet.</p>