xref: /php-src/ext/filter/tests/bug51192.phpt (revision 74859783)
1--TEST--
2bug 51192, FILTER_VALIDATE_URL will invalidate a hostname that includes '-'
3--EXTENSIONS--
4filter
5--FILE--
6<?php
7var_dump(filter_var('http://example.com/path', FILTER_VALIDATE_URL));
8var_dump(filter_var('http://exa-mple.com/path', FILTER_VALIDATE_URL));
9var_dump(filter_var('http://exa_mple.com/path', FILTER_VALIDATE_URL));
10?>
11--EXPECT--
12string(23) "http://example.com/path"
13string(24) "http://exa-mple.com/path"
14bool(false)
15