php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53312 function filter_var has problem with xx@xx.xx.com 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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kyn at vip dot 163 dot com
New email:
PHP Version: OS:

 

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


Test script:
---------------
<?php
var_dump(filter_var('bob@vip.163.com', FILTER_VALIDATE_EMAIL));
?>



Expected result:
----------------
bool(true)

Actual result:
--------------
bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-15 04:48 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2010-11-15 04:48 UTC] rasmus@php.net
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('bob@vip.163.com', FILTER_VALIDATE_EMAIL));
string(15) "bob@vip.163.com"
 [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] pajoye@php.net
-Status: Closed +Status: Feedback
 [2010-11-15 14:55 UTC] pajoye@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2012-04-20 21:35 UTC] nikic@php.net
-Summary: function ffiilter_var had problem with like xx@xx.xx.com address. +Summary: function filter_var has problem with xx@xx.xx.com like address. -Status: Feedback +Status: No Feedback
 [2012-04-20 21:38 UTC] rasmus@php.net
This was fixed in 5.3.3 years ago.
 [2012-04-20 21:38 UTC] rasmus@php.net
-Status: No Feedback +Status: Duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC