xref: /PHP-7.0/ext/standard/tests/url/bug73192.phpt (revision b061fa90)
1--TEST--
2Bug #73192: parse_url return wrong hostname
3--FILE--
4<?php
5
6var_dump(parse_url("http://example.com:80#@google.com/"));
7var_dump(parse_url("http://example.com:80?@google.com/"));
8
9?>
10--EXPECT--
11array(4) {
12  ["scheme"]=>
13  string(4) "http"
14  ["host"]=>
15  string(11) "example.com"
16  ["port"]=>
17  int(80)
18  ["fragment"]=>
19  string(12) "@google.com/"
20}
21array(4) {
22  ["scheme"]=>
23  string(4) "http"
24  ["host"]=>
25  string(11) "example.com"
26  ["port"]=>
27  int(80)
28  ["query"]=>
29  string(12) "@google.com/"
30}
31