Why does this code not echo 0
?
$email = "test@example.com";
$ending = "com";
$email = preg_replace('/[^A-Za-z0-9\-]/', '', $email);
echo substr_compare($email, $ending, strlen($ending)-strlen($email), strlen($ending));
I am expecting 0, per documentation.