Bug #68844 [Opn->Fbk]: filter_var wrong result for url

From: Date: Fri, 16 Jan 2015 20:53:44 +0000
Subject: Bug #68844 [Opn->Fbk]: filter_var wrong result for url
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189994@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68844&edit=1

 ID:                 68844
 Updated by:         danack@php.net
 Reported by:        pavel at 6min dot de
 Summary:            filter_var wrong result for url
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            URL related
 Operating System:   CentOS
 PHP Version:        5.4.36
 Block user comment: N
 Private report:     N

 New Comment:

Checking on http://3v4l.org/fjWEE

"Output for 5.2.0 - 5.6.3, hhvm-3.3.0 - 3.4.1
bool(true)"

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.


Previous Comments:
------------------------------------------------------------------------
[2015-01-16 13:26:29] pavel at 6min dot de

Description:
------------
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:
---------------
$url='https://www.dropbox.com/s/t16e9t2dyv2snl2/Vind%20gratis%20artikelen%20en%20de%20beste%20koopjes%20op%20nl.pepper.com.pdf';
$valid = filter_var($url,FILTER_VALIDATE_URL) !== false;
var_dump($valid);


Expected result:
----------------
true

Actual result:
--------------
false


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68844&edit=1


Thread (3 messages)

« previous php.bugs (#189994) next »