title: PHP: is it wasteful doing all these checks?
body: <p>I'am going to write an IF conditional like this:</p>
  
  <pre><code>if (isset($_GET['code']) &amp;&amp; !empty($_GET['code']) &amp;&amp; ctype_digit($_GET['code'])){
     //other code here
  }
  </code></pre>
  
  <p>I mean, of course if I only check:</p>
  
  <pre><code>if(ctype_digit($_GET['code'])){ }
  </code></pre>
  
  <p>of course $_GET['code'] exists and it is not empty, isn't it wasteful writing this conditional the first way?</p>