public function isEmail($email) { if (is_string($email)) { return (bool) preg_match('/^.+@.+\\..+$/i', $email); } return false; }