title: php many elseif statements better performance
body: <p>I was writing a Site in php the last few weeks and always had a question in my mind. On my index.php I route all the templates file like this   </p>
  
  <pre><code>    if(isset($_GET['search'])){
          include_once 'template/template.search.php';
      }
      elseif(isset($_GET['newsletter'])){
          include_once 'template/template.newsletter.php';
      }
      elseif(isset($_GET['product'])){
          include_once 'template/template.product.php';
      }
      elseif(isset($_GET['categories'])){
          include_once 'template/template.categorie.php';
      }
      elseif(isset($_GET['about'])){
          include_once 'template/template.about.php';
      }
      elseif(isset($_GET['sitemap'])){
          include_once 'template/template.sitemap.php';
      }
      else
      {   
          include_once 'template/template.index.php';     
      }
  </code></pre>
  
  <p>But for me it dosen't look very clean. Is there a better possibility to handle a job like this ?</p>
  
  <p>I already tried it like this, but didn't worked out for me </p>
  
  <pre><code>    $i = 0 ;
      switch($i){
      case(isset($_GET['search'])):
          include_once 'template/template.search.php';
          break;
      default:
          include_once 'template/template.index.php'; 
          break;
  }
  </code></pre>
  
  <p>Edit: Better writing in the title was a bit misleading some of you, so I'm searching for the best performance for sure. </p>