What is the proper use of strpos and or stripos? (Is this a bug?)
<p>This has me thrown for a loop:</p>

<pre><code>$s = "ERROR: 5 - [RecordN...blah blah blah";
print stripos($s, 'error') . "\n";
print strpos($s, "ERROR") . "\n";
print $s . "\n";
</code></pre>

<p>results in:</p>

<pre><code>0
0
ERROR: 5 - [RecordN...blah blah blah
</code></pre>

<p>Huh? All right I'll try something from <a href="http://php.net/manual/en/function.strpos.php" rel="nofollow">here</a>: </p>

<pre><code>$mystring = 'abc';
$findme   = 'a';
$pos = strpos($mystring, $findme);

print $pos . "\n";
</code></pre>

<p>result is:</p>

<pre><code>0
</code></pre>

<p>what?  </p>

<p>I'm running:</p>

<pre><code>php --version

PHP 5.3.6-13ubuntu3.6 with Suhosin-Patch (cli) (built: Feb 11 2012 03:26:01) 
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
</code></pre>

<p>Am I looking at a bug?</p>

<p>Thanks in advance.</p>

<p>EDIT:</p>

<p>Clearly lost my senses there.  Thanks for all the responses. </p>
