3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function qs_search($qs) { $query_string = array(); $query_string['search'] = basename($qs); return http_build_query($query_string); } setlocale(LC_ALL, "en_US.UTF8"); var_dump(qs_search("regular")); var_dump(qs_search("Синодальный")); ?>
Output for 5.0.0 - 7.2.0
string(14) "search=regular" string(7) "search="
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: http_build_query() in <b>/in/In4Kt</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: http_build_query() in <b>/in/In4Kt</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: http_build_query() in <b>/in/In4Kt</b> on line <b>5</b><br />