xref: /PHP-8.1/ext/standard/tests/url/bug63162.phpt (revision bf064112)
1--TEST--
2Test parse_url() for bug #63162
3--DESCRIPTION--
4This test covers tests the inputs:
5[0]=> http://user:pass@host
6[1]=> //user:pass@host
7[2]=> //user@host
8--FILE--
9<?php
10var_dump(parse_url('http://user:pass@host'));
11var_dump(parse_url('//user:pass@host'));
12var_dump(parse_url('//user@host'));
13?>
14--EXPECT--
15array(4) {
16  ["scheme"]=>
17  string(4) "http"
18  ["host"]=>
19  string(4) "host"
20  ["user"]=>
21  string(4) "user"
22  ["pass"]=>
23  string(4) "pass"
24}
25array(3) {
26  ["host"]=>
27  string(4) "host"
28  ["user"]=>
29  string(4) "user"
30  ["pass"]=>
31  string(4) "pass"
32}
33array(2) {
34  ["host"]=>
35  string(4) "host"
36  ["user"]=>
37  string(4) "user"
38}
39