verify, if the string starts with given substring
<p>i have a string in <code>$str</code> variable.</p>

<p>how can i verify is it starts with some word?</p>

<hr>

<p><strong>example</strong></p>

<p><code>$str = "http://somesite.com/somefolder/somefile.php";</code></p>

<p>when i wrote the following script</p>

<p><code>if(strpos($str, "http://") == '0') echo "yes"; //returns yes</code></p>

<p>BUT it returns <strong>yes</strong> even when i wrote</p>

<p><code>if(strpos($str, "other word here") == '0') echo "yes"; //returns yes too</code></p>

<p>i think it <code>strpos</code> returns <code>zero</code> if it can't find substring too(or empty value). </p>

<p>so, what can i do, if i want to verify the word, which in the start of string?(maybe i must use <code>===</code> in this case?)</p>

<p>Thanks</p>
