php-src/ext/filter/tests/019.phpt
Derick Rethans 0a3b663a1b - MFH: Change validating filters to return "null" on failure so that they can be
distinguised from the value "false" which might be valid as well.
2006-10-11 14:49:13 +00:00

21 lines
398 B
PHP

--TEST--
filter_var() & FILTER_VALIDATE_IP and weird data
--FILE--
<?php
var_dump(filter_var("....", FILTER_VALIDATE_IP));
var_dump(filter_var("...", FILTER_VALIDATE_IP));
var_dump(filter_var("..", FILTER_VALIDATE_IP));
var_dump(filter_var(".", FILTER_VALIDATE_IP));
var_dump(filter_var("1.1.1.1", FILTER_VALIDATE_IP));
echo "Done\n";
?>
--EXPECTF--
NULL
NULL
NULL
NULL
string(7) "1.1.1.1"
Done