title: PHP: Compare Integer/String Variable with Null
body: <p>I have an Integer/String variable. If I have an error in mysqli statement it becomes <strong>String</strong> and without errors it becomes number of <a href="http://php.net/manual/en/mysqli-stmt.affected-rows.php" rel="nofollow noreferrer">affected rows</a> (<strong>Integer</strong>).</p>
  
  <p>But in PHP if we have something like this:</p>
  
  <pre><code>$i = 0;
  if ( $i &lt; 0 || $i == null ) {
      var_dump($i);
  }
  </code></pre>
  
  <p>We have this result:</p>
  
  <pre><code>int 0
  </code></pre>
  
  <p><em>First</em>, I want to know why this happens? (I mean, if <code>var_dump</code> is <code>int 0</code>, why the <strong>if</strong> statement doesn't work?)</p>
  
  <p><em>Second</em>, I want the solution for my comparison.</p>