blob: bbc3cb9d1b2bfd459811b1a3b6d66c626f30aef5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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"
}
|