What are common pitfalls when validating email inputs in PHP?

Common pitfalls when validating email inputs in PHP include not using the proper validation filter, not handling special characters correctly, and not considering international email addresses. To solve these issues, it is recommended to use the `filter_var()` function with the `FILTER_VALIDATE_EMAIL` filter, handle special characters using functions like `filter_var()` with `FILTER_SANITIZE_EMAIL`, and use libraries like `egulias/email-validator` for more comprehensive email validation.

// Validate email input using filter_var
$email = $_POST['email'];
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
    echo "Email is valid";
} else {
    echo "Invalid email";
}