Bug #70807 [Opn->Fbk]: filter_var

From: Date: Wed, 28 Oct 2015 17:46:50 +0000
Subject: Bug #70807 [Opn->Fbk]: filter_var
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196858@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70807&edit=1 ID: 70807 Updated by: requinix@php.net Reported by: mertloka at gmail dot com Summary: filter_var -Status: Open +Status: Feedback Type: Bug Package: *Network Functions Operating System: ubuntu PHP Version: 5.4Git-2015-10-28 (Git) Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. https://3v4l.org/534p6 Previous Comments: ------------------------------------------------------------------------ [2015-10-28 15:29:35] mertloka at gmail dot com Description: ------------ $ip = "::ffff:0:10.0.0.3"; if (!filter_var($ip, FILTER_VALIDATE_IP) === false) { echo("$ip is a valid IP address"); } else { echo("$ip is not a valid IP address"); } this return invalid also it is valid Test script: --------------- $ip = "::ffff:0:10.0.0.3"; if (!filter_var($ip, FILTER_VALIDATE_IP) === false) { echo("$ip is a valid IP address"); } else { echo("$ip is not a valid IP address"); } this return invalid also it is valid ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70807&edit=1

« previous php.bugs (#196858) next »