|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53312 function filter_var has problem with like address.
Submitted: 2010-11-15 04:42 UTC Modified: 2012-04-20 21:38 UTC
From: kyn at vip dot 163 dot com Assigned:
Status: Duplicate Package: Strings related
PHP Version: 5.3.0 OS: centos 5.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
31 + 2 = ?
Subscribe to this entry?

 [2010-11-15 04:42 UTC] kyn at vip dot 163 dot com
the is truly email address, but fiilter_var didnot think the email is valid.

Test script:
var_dump(filter_var('', FILTER_VALIDATE_EMAIL));

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-15 04:48 UTC]
-Status: Open +Status: Feedback
 [2010-11-15 04:48 UTC]
Are you sure you are using PHP 5.3.3?  I just tested your code here and it works 
fine on PHP 5.3.3/Centos:

12:35pm vm:~> php -v
PHP 5.3.3 (cli) (built: Oct 20 2010 15:24:49) 
12:35pm vm:~> php -a
Interactive shell

php > var_dump(filter_var('', FILTER_VALIDATE_EMAIL));
string(15) ""
 [2010-11-15 13:26 UTC] kyn at vip dot 163 dot com
-Status: Feedback +Status: Closed -PHP Version: 5.3.3 +PHP Version: 5.3.0
 [2010-11-15 13:26 UTC] kyn at vip dot 163 dot com
sorry, i am wrong, i use 5.3.0
 [2010-11-15 14:55 UTC]
-Status: Closed +Status: Feedback
 [2010-11-15 14:55 UTC]
Please try using this snapshot:
For Windows:

 [2012-04-20 21:35 UTC]
-Summary: function ffiilter_var had problem with like address. +Summary: function filter_var has problem with like address. -Status: Feedback +Status: No Feedback
 [2012-04-20 21:38 UTC]
This was fixed in 5.3.3 years ago.
 [2012-04-20 21:38 UTC]
-Status: No Feedback +Status: Duplicate
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 19 14:03:17 2022 UTC