3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date_span = array( 'start' => array('month' => '04', 'day' => '21', 'year' => '2020'), 'end' => array('month' => '04', 'day' => '21', 'year' => '2020'), ); $date_span_query = http_build_query($date_span); var_dump($date_span_query); var_dump(urldecode($date_span_query));
based on JKYEM
Output for 5.1.3 - 7.2.0
string(111) "start%5Bmonth%5D=04&start%5Bday%5D=21&start%5Byear%5D=2020&end%5Bmonth%5D=04&end%5Bday%5D=21&end%5Byear%5D=2020" string(87) "start[month]=04&start[day]=21&start[year]=2020&end[month]=04&end[day]=21&end[year]=2020"
Output for 5.0.0 - 5.1.2
string(87) "start[month]=04&start[day]=21&start[year]=2020&end[month]=04&end[day]=21&end[year]=2020" string(87) "start[month]=04&start[day]=21&start[year]=2020&end[month]=04&end[day]=21&end[year]=2020"
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: http_build_query() in /in/LZQHW on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: http_build_query() in /in/LZQHW on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: http_build_query() in /in/LZQHW on line 10