Most efficient of using 'if' : <p>Code 1 :</p>

<pre><code>if( !(varOfsomeClass-&gt;isValid($imParams)) ){
    //some function i need to run
}
</code></pre>

<ul>
<li>run function isValid</li>
<li>reverse value with not (!)</li>
<li>check value with if</li>
</ul>

<p>Code 2 :</p>

<pre><code>if( (varOfsomeClass-&gt;isValid($imParams)) ){
} else {
    //some function i need to run
}
</code></pre>

<ul>
<li>run function isValid</li>
<li>check value with if</li>
<li>enter else part(maybe, or do nothing because isValid is true)</li>
</ul>

<p>which is more efficient? which is better to use?</p>

<p>nb: Code 1 is indeed more 'human'</p>
