diff options
Diffstat (limited to 'ext/standard/tests/url/bug64604.phpt')
-rw-r--r-- | ext/standard/tests/url/bug64604.phpt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/standard/tests/url/bug64604.phpt b/ext/standard/tests/url/bug64604.phpt new file mode 100644 index 0000000000..bbc3cb9d1b --- /dev/null +++ b/ext/standard/tests/url/bug64604.phpt @@ -0,0 +1,40 @@ +--TEST-- +Bug #64604 parse_url is inconsistent with specified port +--FILE-- +<?php +var_dump(parse_url('//localhost/path')); +var_dump(parse_url('//localhost:80/path')); +var_dump(parse_url('//localhost:/path')); +var_dump(parse_url('http://localhost:80/path')); +?> +--EXPECT-- +array(2) { + ["host"]=> + string(9) "localhost" + ["path"]=> + string(5) "/path" +} +array(3) { + ["host"]=> + string(9) "localhost" + ["port"]=> + int(80) + ["path"]=> + string(5) "/path" +} +array(2) { + ["host"]=> + string(9) "localhost" + ["path"]=> + string(5) "/path" +} +array(4) { + ["scheme"]=> + string(4) "http" + ["host"]=> + string(9) "localhost" + ["port"]=> + int(80) + ["path"]=> + string(5) "/path" +} |