xref: /PHP-8.1/ext/filter/tests/019.phpt (revision 74859783)
1--TEST--
2filter_var() & FILTER_VALIDATE_IP and weird data
3--EXTENSIONS--
4filter
5--FILE--
6<?php
7
8var_dump(filter_var("....", FILTER_VALIDATE_IP));
9var_dump(filter_var("...", FILTER_VALIDATE_IP));
10var_dump(filter_var("..", FILTER_VALIDATE_IP));
11var_dump(filter_var(".", FILTER_VALIDATE_IP));
12var_dump(filter_var("1.1.1.1", FILTER_VALIDATE_IP));
13
14echo "Done\n";
15?>
16--EXPECT--
17bool(false)
18bool(false)
19bool(false)
20bool(false)
21string(7) "1.1.1.1"
22Done
23