3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = 'new_worksheet_name=TEST&new_worksheet_campaign=2&new_worksheet_recording_group=2&new_worksheet_vendors=1739&new_worksheet_publishers=1903&new_worksheet_agents=1768&new_worksheet_questions=&new_question_name_1=hello&new_question_text_1=disfbaspdfnopasdnf&new_question_weight_1=23&new_question_name_2=yo&new_question_text_2=44453jroj&new_question_weight_2=63&new_question_name_3=sup&new_question_text_3=45njfgndkfgnorgnoegn&new_question_weight_3=77'; $r = "/=.*&/"; $test_array = array(); parse_str($data, $test_array); var_dump($test_array);
Output for 4.3.0 - 7.2.0
array(16) { ["new_worksheet_name"]=> string(4) "TEST" ["new_worksheet_campaign"]=> string(1) "2" ["new_worksheet_recording_group"]=> string(1) "2" ["new_worksheet_vendors"]=> string(4) "1739" ["new_worksheet_publishers"]=> string(4) "1903" ["new_worksheet_agents"]=> string(4) "1768" ["new_worksheet_questions"]=> string(0) "" ["new_question_name_1"]=> string(5) "hello" ["new_question_text_1"]=> string(18) "disfbaspdfnopasdnf" ["new_question_weight_1"]=> string(2) "23" ["new_question_name_2"]=> string(2) "yo" ["new_question_text_2"]=> string(9) "44453jroj" ["new_question_weight_2"]=> string(2) "63" ["new_question_name_3"]=> string(3) "sup" ["new_question_text_3"]=> string(20) "45njfgndkfgnorgnoegn" ["new_question_weight_3"]=> string(2) "77" }