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); echo $b; ?>
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" } scheme=http&host=clipr.in&path=%2Foutput%2Fproduct.php&query=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" } <br /> <b>Fatal error</b>: Call to undefined function: http_build_query() in <b>/in/qFtJT</b> on line <b>5</b><br />
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" } <br /> <b>Fatal error</b>: Call to undefined function: http_build_query() in <b>/in/qFtJT</b> on line <b>5</b><br />
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" } <br /> <b>Fatal error</b>: Call to undefined function: http_build_query() in <b>/in/qFtJT</b> on line <b>5</b><br />