3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print_r(parse_url('http://www.esky.pl/test-test/test image - 1.jpg')); print_r(parse_url('http://www.esky.pl/test-test/test image - 1.jpg?abc=dev')); print_r(parse_url('http://www.esky.pl/?abc=def')); print_r(parse_url('http://www.esky.pl?abc=def'));
based on B0s1i
Output for 5.3.11 - 7.3.0rc4
Array ( [scheme] => http [host] => www.esky.pl [path] => /test-test/test image - 1.jpg ) Array ( [scheme] => http [host] => www.esky.pl [path] => /test-test/test image - 1.jpg [query] => abc=dev ) Array ( [scheme] => http [host] => www.esky.pl [path] => / [query] => abc=def ) Array ( [scheme] => http [host] => www.esky.pl [query] => abc=def )