<?php
$email = 'runoob@runoob.com';
//邮箱地址
if (filter_var($email, FILTER_VALIDATE_EMAIL))
{ $emailMsg = "正确邮箱格式"; } else { $emailMsg = "非法邮箱格式"; }
echo $emailMsg;