xref: /PHP-7.1/ext/filter/tests/bug46973.phpt (revision 7af945e2)
1--TEST--
2Bug #46973 (IPv6 address filter rejects valid address)
3--SKIPIF--
4<?php if (!extension_loaded("filter")) die("skip"); ?>
5--FILE--
6<?php
7
8var_dump(filter_var('1fff::a88:85a3::172.31.128.1', FILTER_VALIDATE_IP,FILTER_FLAG_IPV6));
9var_dump(filter_var('3ffe:6a88:85a3:08d3:1319:8a2e:0370:7344', FILTER_VALIDATE_IP,FILTER_FLAG_IPV6));
10var_dump(filter_var('1fff::a88:85a3::172.31.128.1', FILTER_VALIDATE_IP,FILTER_FLAG_IPV6));
11
12?>
13--EXPECTF--
14bool(false)
15string(39) "3ffe:6a88:85a3:08d3:1319:8a2e:0370:7344"
16bool(false)
17