title: if statement condition optimisation
body: <p>I have an if statement with two conditions (separated by an OR operator), one of the conditions covers +70% of situations and takes far less time to process/execute than the second condition, so in the interests of speed I only want the second condition to be processed if the first condition evaluates to false.</p>
  
  <p>if I order the conditions so that the first condition (the quicker one) appears in the if statement first - on the occasions where this condition is met and evaluates true is the second condition even processed?</p>
  
  <pre><code>if ( (condition1) | (condition2) ){
    // do this
  }
  </code></pre>
  
  <p>or would I need to nest two if statements to only check the second condition if the first evaluates to false?</p>
  
  <pre><code>if (condition1){
    // do this
  }else if (condition2){
    // do this
  }
  </code></pre>
  
  <p>I am working in PHP, however, I assume that this may be language-agnostic.</p>