|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68844 filter_var wrong result for url
Submitted: 2015-01-16 13:26 UTC Modified: 2015-01-25 04:22 UTC
From: pavel at 6min dot de Assigned:
Status: No Feedback Package: URL related
PHP Version: 5.4.36 OS: CentOS
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.
Block user comment
Status: Assign to:
Bug Type:
From: pavel at 6min dot de
New email:
PHP Version: OS:


 [2015-01-16 13:26 UTC] pavel at 6min dot de
I used the function filter_var to filter for valid urls but that is the problem i end up.

The version of php I used is 5.4.35 ( was not possible to choose it from the list above )

Test script:
$valid = filter_var($url,FILTER_VALIDATE_URL) !== false;

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-16 20:53 UTC]
-Status: Open +Status: Feedback
 [2015-01-16 20:53 UTC]
Checking on

"Output for 5.2.0 - 5.6.3, hhvm-3.3.0 - 3.4.1

Please can you check what version of PHP you are actually running. And that you are actually getting that output for this code - i.e. that the response isn't being cached, or maybe opcache is running different code than you're expecting.
 [2015-01-25 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jul 28 10:01:24 2021 UTC