Why is it important to use strict comparison (!==) when checking for false in strpos() function in PHP?

When using the strpos() function in PHP to check for the existence of a substring within a string, it's important to use strict comparison (!==) when checking for false. This is because strpos() returns false if the substring is not found in the string, but it can also return 0 if the substring is found at the beginning of the string. Using strict comparison ensures that false is only returned when the substring is not found.

$string = "Hello, world!";
$substring = "foo";

if (strpos($string, $substring) !== false) {
    echo "Substring found!";
} else {
    echo "Substring not found!";
}