summaryrefslogtreecommitdiff
path: root/ext/standard/tests/url/bug73192.phpt
blob: 6ecb47718d04e3f3b311df15b3d295ee22984355 (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
--TEST--
Bug #73192: parse_url return wrong hostname
--FILE--
<?php

var_dump(parse_url("http://example.com:80#@google.com/"));
var_dump(parse_url("http://example.com:80?@google.com/"));

?>
--EXPECT--
array(4) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "example.com"
  ["port"]=>
  int(80)
  ["fragment"]=>
  string(12) "@google.com/"
}
array(4) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(11) "example.com"
  ["port"]=>
  int(80)
  ["query"]=>
  string(12) "@google.com/"
}