xref: /PHP-5.5/ext/filter/tests/bug51192.phpt (revision 0efe78a5)
1--TEST--
2bug 51192, FILTER_VALIDATE_URL will invalidate a hostname that includes '-'
3--SKIPIF--
4<?php if (!extension_loaded("filter")) die("skip"); ?>
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--EXPECT--
11string(23) "http://example.com/path"
12string(24) "http://exa-mple.com/path"
13bool(false)
14