title: Best way to do a PHP switch with multiple values per case?
body: <p>How would you do this PHP switch statement?</p>
  
  <p>Also note that these are much smaller versions, the 1 I need to create will have a lot more values added to it.</p>
  
  <p>Version 1:  </p>
  
  <pre><code>switch ($p) { 
      case 'home': 
      case '': 
          $current_home = 'current';
      break; 
  
      case 'users.online': 
      case 'users.location': 
      case 'users.featured': 
      case 'users.new': 
      case 'users.browse': 
      case 'users.search': 
      case 'users.staff': 
          $current_users = 'current';
      break;
  
      case 'forum': 
          $current_forum = 'current';
      break; 
  } 
  </code></pre>
  
  <p>Version 2:  </p>
  
  <pre><code>switch ($p) { 
      case 'home': 
          $current_home = 'current';
      break; 
  
      case 'users.online' || 'users.location' || 'users.featured' || 'users.browse' || 'users.search' || 'users.staff': 
          $current_users = 'current';
      break;
  
      case 'forum': 
          $current_forum = 'current';
      break; 
  } 
  </code></pre>
  
  <p><strong>UPDATE - Test Results</strong>  </p>
  
  <p>I ran some speed test on 10,000 iterations,  </p>
  
  <p>Time1: 0.0199389457703 // If statements<br>
  Time2: 0.0389049446106 //switch statements<br>
  Time3: 0.106977939606 // Arrays  </p>