3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function qs_search($qs) { parse_str($_SERVER['QUERY_STRING'], $query_string); $query_string['search'] = basename($qs); return http_build_query($query_string); } qs_search("regular"); qs_search("Синодальный");
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: QUERY_STRING in /in/7MLH1 on line 3 Notice: Undefined index: QUERY_STRING in /in/7MLH1 on line 3
Output for 5.0.0 - 5.2.17
Notice: Undefined index: QUERY_STRING in /in/7MLH1 on line 3 Notice: Undefined index: QUERY_STRING in /in/7MLH1 on line 3
Output for 4.4.5 - 4.4.9
Notice: Undefined index: QUERY_STRING in /in/7MLH1 on line 3 Fatal error: Call to undefined function: http_build_query() in /in/7MLH1 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined index: QUERY_STRING in /in/7MLH1 on line 3 Fatal error: Call to undefined function: http_build_query() in /in/7MLH1 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined index: QUERY_STRING in /in/7MLH1 on line 3 Fatal error: Call to undefined function: http_build_query() in /in/7MLH1 on line 5