File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
filter /
tests /
bug53150.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:56 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Bug #53150 (FILTER_FLAG_NO_RES_RANGE is missing some IP ranges)
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--
<?php
var_dump(filter_var('127.0.0.1', FILTER_VALIDATE_IP));
var_dump(filter_var("::1", FILTER_VALIDATE_IP));
var_dump(filter_var('127.0.0.1', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
var_dump(filter_var('::1', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
var_dump(filter_var('128.0.0.1', FILTER_VALIDATE_IP));
var_dump(filter_var('128.0.0.1', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
var_dump(filter_var('191.255.0.0', FILTER_VALIDATE_IP));
var_dump(filter_var('191.255.0.0', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE));
?>
--EXPECT--
string(9) "127.0.0.1"
string(3) "::1"
bool(false)
bool(false)
string(9) "128.0.0.1"
bool(false)
string(11) "191.255.0.0"
bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>