3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a =parse_url('http://clipr.in/output/product.php?id=24787'); var_dump($a); $a['query']="b"; $b = http_build_query($a); $parsedurl = $a; echo $parsedurl['scheme']."://".$parsedurl['host']."".$parsedurl['path']."?".$parsedurl['query']; ?>
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(8) "clipr.in" ["path"]=> string(19) "/output/product.php" ["query"]=> string(8) "id=24787" } http://clipr.in/output/product.php?b
Output for 4.4.5 - 4.4.9
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(8) "clipr.in" ["path"]=> string(19) "/output/product.php" ["query"]=> string(8) "id=24787" } Fatal error: Call to undefined function: http_build_query() in /in/mB14L on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(8) "clipr.in" ["path"]=> string(19) "/output/product.php" ["query"]=> string(8) "id=24787" } Fatal error: Call to undefined function: http_build_query() in /in/mB14L on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(8) "clipr.in" ["path"]=> string(19) "/output/product.php" ["query"]=> string(8) "id=24787" } Fatal error: Call to undefined function: http_build_query() in /in/mB14L on line 5