|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-12-30 14:11 UTC] alexandre at amen dot fr
Description:
------------
The IPv6 address filter in the filter extension rejects valid IPv6
address notations: '1fff::a88:85a3::172.31.128.1'
Reproduce code:
---------------
var_dump(filter_var('1fff::a88:85a3::172.31.128.1', FILTER_VALIDATE_IP,FILTER_FLAG_IPV6));
Expected result:
----------------
1fff::a88:85a3::172.31.128.1
Actual result:
--------------
false
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
oups, I'm sorry, I think I missed my copy/paste. with this : var_dump(filter_var('1fff:0:a88:85a3::172.31.128.1',FILTER_VALIDATE_IP,FILTER_FLAG_IPV6)); It doesn't work My apologies for the previous errorfunny thing is, var_dump(filter_var('1fff::a88:85a3::172.31.128.1', FILTER_VALIDATE_IP,FILTER_FLAG_IPV6)); returns string(28) "1fff::a88:85a3::172.31.128.1" which is wrong i.e. the implementation AS IS allows _two_ '::' in an ipv6 address