title: Checking for existence in a string with strpos
body: <p>I've only ever seen developers use strict comparisons when they use <code>strpos</code> to check for the existence of a substring:</p>
  
  <pre><code>if (strpos($haystack,$needle) !== false) {
  
  }
  </code></pre>
  
  <p>It occurred to me today that one <em>could</em> use <code>is_numeric</code> ins</p>
  
  <pre><code>if (is_numeric(strpos($haystack,$needle))) {
  
  }
  </code></pre>
  
  <p>Is there a reason one would use one over the other (specifically in this use case)?</p>
  
  <p>If you think about it, the purpose of <code>strpos</code> is to return the <em>position</em> of the substring.  Only if it doesn't exist, will it return false.  The position is a <em>number</em>.  Thus, <code>is_numeric</code> is pretty qualified to be considered semantically.</p>