- strpos: documentation ( source)
<?php
$string = 'Hello, there!';
if (!strpos($string, 'Hello')) {
echo 'Did not detect "Hello" in string (default)' . PHP_EOL;
}
if (false == strpos($string, 'Hello')) {
echo 'Did not detect "Hello" in string (loose equality)' . PHP_EOL;
}
if (false === strpos($string, 'Hello')) {
echo 'Did not detect "Hello" in string (strict equality)' . PHP_EOL;
}