<?php
$email = "demo@example.com";
if (filter_var($email, FILTER_VALIDATE_EMAIL))
{
echo '"' . $email . '" 是有效的。';
}
else
{
echo '"' . $email . '" 是无效的。';
}We use the FILTER_VALIDATE_EMAIL filter to verify the email address. Here we need to determine whether the email demo@example.com is valid.
The front desk access results are as follows