PHP FILTER VALIDATE EMAIL does not work correctly

0 votes

I employ PHP 5.3.10. Here is the code:

<?php
$email = "test@example.c";
if (filter_var($email, FILTER_VALIDATE_EMAIL))
        echo "Email: ".$email." correct";
else
        echo "email not correct";
?>

"Email: test@example.c correct," it responds.

According to this list: http://data.iana.org/TLD/tlds-alpha-by-domain.txt, I'm not aware of any top level domains (TLDs) that are only one character in length.

Therefore, is the FILTER VALIDATE EMAIL filter functioning properly or not?

Aug 4 in PHP by Kithuzzz
• 4,080 points
10 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
0 answers

How does true/false work in PHP?

I'm curious about PHP's internal handling of ...READ MORE

Aug 4 in PHP by Kithuzzz
• 4,080 points
7 views
0 votes
0 answers

How does PHP 'foreach' actually work?

Let me start by stating that I ...READ MORE

Aug 7 in PHP by Kithuzzz
• 4,080 points
8 views
0 votes
1 answer

How to check if php session is already started or not?

Hello kartik, Use session_id(), it returns an empty string ...READ MORE

answered Apr 1, 2020 in PHP by Niroj
• 82,740 points
3,037 views
0 votes
1 answer

What does double question mark (??) operator mean in PHP?

Hello, It's the "null coalescing operator", added in ...READ MORE

answered Apr 2, 2020 in PHP by Niroj
• 82,740 points
4,791 views
0 votes
1 answer

Why does the PHP json_encode function convert UTF-8 strings to hexadecimal entities?

Hii @kartik, Working with different servers with various ...READ MORE

answered Apr 20, 2020 in PHP by Niroj
• 82,740 points
2,690 views
0 votes
1 answer

Error:WP_Query() does not return all entries

Hello, Try adding posts_per_page=-1 to the string of parameters passed ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,740 points
262 views
0 votes
0 answers

How to validate an Email in PHP?

How can I validate the input value ...READ MORE

Jun 16 in PHP by narikkadan
• 11,280 points
7 views
+1 vote
2 answers

Scp Php files into server using gradle

Tru something like this: plugins { id ...READ MORE

answered Oct 11, 2018 in DevOps & Agile by lina
• 8,220 points
543 views
0 votes
1 answer

How do I create folder under an Amazon S3 bucket through PHP API?

Of Course, it is possible to create ...READ MORE

answered Apr 24, 2018 in AWS by anonymous
9,290 views
0 votes
1 answer

Failure uploading Image on AmazonS3 with PHP SDK

Try this, I took it out from ...READ MORE

answered May 4, 2018 in AWS by Cloud gunner
• 4,660 points
2,217 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP