xref: /PHP-8.1/ext/standard/tests/url/bug74780.phpt (revision d679f022)
1--TEST--
2Bug #74780	parse_url() borks when query string contains colon
3--FILE--
4<?php
5var_dump(
6    parse_url('//php.net/path?query=1:2'),
7    parse_url('//php.net/path.php?query=a:b'),
8    parse_url('//username@php.net/path?query=1:2')
9);
10
11?>
12--EXPECT--
13array(3) {
14  ["host"]=>
15  string(7) "php.net"
16  ["path"]=>
17  string(5) "/path"
18  ["query"]=>
19  string(9) "query=1:2"
20}
21array(3) {
22  ["host"]=>
23  string(7) "php.net"
24  ["path"]=>
25  string(9) "/path.php"
26  ["query"]=>
27  string(9) "query=a:b"
28}
29array(4) {
30  ["host"]=>
31  string(7) "php.net"
32  ["user"]=>
33  string(8) "username"
34  ["path"]=>
35  string(5) "/path"
36  ["query"]=>
37  string(9) "query=1:2"
38}
39