3v4l.org

run code in 150+ 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("Terça")); var_dump(qs_search("AÈ``IÒ")); ?>
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(17) "search=Ter%C3%A7a" string(27) "search=A%C3%88%60%60I%C3%92"
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: http_build_query() in /in/sZtuK on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: http_build_query() in /in/sZtuK on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: http_build_query() in /in/sZtuK on line 5