title: PHP switch statement doesn't executes values using return
body: <p>Is it possible that PHP switch statement does not executes the switch desired result while using return?</p>
  
  <p>What is the difference between these two statements?</p>
  
  <pre><code>$foo = '2';    
  switch ($foo) {       
      case 1:
          echo 1;
          break;
  
      case 2:
          echo 2;
          break;
  }
  </code></pre>
  
  <p>executes 2</p>
  
  <p>versus</p>
  
  <pre><code>$foo = '2';    
  switch ($foo) {       
      case 1:
          return 1;
          break;
  
      case 2:
          return 2;
          break;
  }
  </code></pre>
  
  <p>Doesnt seem to work.</p>
  
  <p>is there a way to make it work?</p>