1--TEST--
2Test parse_url() function: can not recognize port without scheme
3--FILE--
4<?php
5echo "*** Testing parse_url() :can not recognize port without scheme ***\n";
6echo 'parse 127.0.0.1:9999?', PHP_EOL;
7var_dump(parse_url('127.0.0.1:9999?'));
8echo 'parse 127.0.0.1:9999#', PHP_EOL;
9var_dump(parse_url('127.0.0.1:9999#'));
10echo 'parse internal:#feeding', PHP_EOL;
11var_dump(parse_url('internal:#feeding'));
12echo 'parse magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C', PHP_EOL;
13var_dump(parse_url('magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C'));
14?>
15--EXPECT--
16*** Testing parse_url() :can not recognize port without scheme ***
17parse 127.0.0.1:9999?
18array(3) {
19  ["scheme"]=>
20  string(9) "127.0.0.1"
21  ["path"]=>
22  string(4) "9999"
23  ["query"]=>
24  string(0) ""
25}
26parse 127.0.0.1:9999#
27array(3) {
28  ["scheme"]=>
29  string(9) "127.0.0.1"
30  ["path"]=>
31  string(4) "9999"
32  ["fragment"]=>
33  string(0) ""
34}
35parse internal:#feeding
36array(2) {
37  ["scheme"]=>
38  string(8) "internal"
39  ["fragment"]=>
40  string(7) "feeding"
41}
42parse magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C
43array(2) {
44  ["scheme"]=>
45  string(6) "magnet"
46  ["query"]=>
47  string(44) "xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C"
48}
49