What are the potential pitfalls of using strpos() function in PHP for email validation?

Using strpos() function for email validation can lead to false positives as it only checks for the presence of the "@" symbol in the email address. This can result in allowing invalid email addresses to pass through the validation process. To accurately validate an email address, it is recommended to use filter_var() function with FILTER_VALIDATE_EMAIL flag in PHP.

$email = "example@example.com";

if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
    echo "Valid email address";
} else {
    echo "Invalid email address";
}