@ 2017-06-19T11:43:16Z <?php
$url = '//php.net/manual/en/function.parse-url.php?v=1:337';
// Prior to 5.4.7 this would show the path as "//www.example.com/path"
var_dump(parse_url($url));
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.22 - 7.0.33 , 7.1.8 - 7.1.25 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.19 , 8.3.0 - 8.3.7 array(3) {
["host"]=>
string(7) "php.net"
["path"]=>
string(33) "/manual/en/function.parse-url.php"
["query"]=>
string(7) "v=1:337"
}
Output for 7.0.0 - 7.0.21 , 7.1.0 - 7.1.7 array(2) {
["path"]=>
string(42) "//php.net/manual/en/function.parse-url.php"
["query"]=>
string(7) "v=1:337"
}
Output for 5.5.24 - 5.5.38 , 5.6.8 - 5.6.38 array(4) {
["host"]=>
string(7) "php.net"
["port"]=>
int(337)
["path"]=>
string(33) "/manual/en/function.parse-url.php"
["query"]=>
string(7) "v=1:337"
}
Output for 5.3.3 - 5.3.29 , 5.4.0 - 5.4.45 , 5.5.0 - 5.5.23 , 5.6.0 - 5.6.7 bool(false)
Output for 5.2.0 - 5.2.17 , 5.3.0 - 5.3.2 Warning: parse_url(//php.net/manual/en/function.parse-url.php?v=1:337): Unable to parse URL in /in/Tg6Cg on line 6
bool(false)
Output for 4.3.2 - 4.3.11 , 4.4.0 - 4.4.9 , 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 Warning: parse_url(//php.net/manual/en/function.parse-url.php?v=1:337): Unable to parse url in /in/Tg6Cg on line 6
bool(false)
Output for 4.3.0 - 4.3.1 array(2) {
["host"]=>
string(46) "//php.net/manual/en/function.parse-url.php?v=1"
["port"]=>
int(337)
}
preferences:dark mode live preview
191.3 ms | 401 KiB | 424 Q