title: Which is faster: in_array() or a bunch of expressions in PHP?
body: <p>Is it faster to do the following:</p>
  
  <pre><code> if ($var != 'test1' &amp;&amp; $var != 'test2' &amp;&amp; $var != 'test3' &amp;&amp; $var != 'test4') { ... }
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code> if (!in_array($var, array('test1', 'test2', 'test3', 'test4') { ... }
  </code></pre>
  
  <p>Is there a number of values at which point it's faster to do one or the other?</p>
  
  <p>(In this case, the array used in the second option doesn't alreay exist.)</p>