summaryrefslogtreecommitdiff
path: root/ext/filter/tests/bug51192.phpt
blob: 16ffeff64471a8b1a3cecebb9ebaaec2a55bf77a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
bug 51192, FILTER_VALIDATE_URL will invalidate a hostname that includes '-'
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--
<?php
var_dump(filter_var('http://example.com/path', FILTER_VALIDATE_URL));
var_dump(filter_var('http://exa-mple.com/path', FILTER_VALIDATE_URL));
var_dump(filter_var('http://exa_mple.com/path', FILTER_VALIDATE_URL));
--EXPECT--
string(23) "http://example.com/path"
string(24) "http://exa-mple.com/path"
bool(false)