|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52334 not allowing urls with hyphens in the domain
Submitted: 2010-07-14 09:15 UTC Modified: 2010-07-14 09:22 UTC
From: code at margni dot com Assigned:
Status: Duplicate Package: Filter related
PHP Version: 5.3.2 OS: *NIX
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:
35 + 27 = ?
Subscribe to this entry?

 [2010-07-14 09:15 UTC] code at margni dot com
hyphen (-) is a valid character in a domain name

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

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-14 09:18 UTC]
-Status: Open +Status: Duplicate
 [2010-07-14 09:18 UTC]
Already reported and fixed in 5.3.3
 [2010-07-14 09:19 UTC] code at margni dot com
-: +: code at margni dot com
 [2010-07-14 09:19 UTC] code at margni dot com
fixed my email
 [2010-07-14 09:20 UTC] code at margni dot com
-Status: Duplicate +Status: Closed
 [2010-07-14 09:20 UTC] code at margni dot com
 [2010-07-14 09:22 UTC]
-Status: Closed +Status: Duplicate
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 27 17:03:33 2022 UTC