|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-02-08 14:58 UTC] sucotronic at gmail dot com
Description:
------------
If you use the filter_var function to test an email address, and the address
starts with the '+' sign, it's marked as invalid, but it isn't.
Test script:
---------------
filter_var("+4654651651@test.com", FILTER_VALIDATE_EMAIL)
Expected result:
----------------
Return the string and not false.
Actual result:
--------------
false
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 08:00:01 2025 UTC |
Unable to reproduce in 5.3/5.4: php > echo filter_var("+4654651651@test.com", FILTER_VALIDATE_EMAIL); +4654651651@test.com Make sure you are actually trying this in 5.3. This may have been broken in 5.2, but was fixed years ago in 5.3.