3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function isEmptyArray($item) { if (is_array($item)) { return array_filter($item, 'isEmptyArray'); } if (!empty($item) || $item === "0") { return true; } return false; } function removeEmptyArrays($array) { $filteredArray = array_filter($array, 'isEmptyArray'); return $filteredArray; } $string='client_no=3286868&auth_key=K6htqteKvAFpJE4qaE655hTQRSVN9PGU&rest_call=create_acct_complete_m&billing_group[billing_group_row][0][billing_group_name]=&billing_group[billing_group_row][0][billing_group_description]=&billing_group[billing_group_row][0][client_billing_group_id]=&billing_group[billing_group_row][0][billing_group_idx]=&billing_group[billing_group_row][0][notify_method]=&billing_group[billing_group_row][0][notify_template_group]=&billing_group[billing_group_row][0][statement_template]='; parse_str($string, $output); var_dump($output); ?>
based on E17mA
Output for 5.3.20 - 7.2.0
array(4) { ["client_no"]=> string(7) "3286868" ["auth_key"]=> string(32) "K6htqteKvAFpJE4qaE655hTQRSVN9PGU" ["rest_call"]=> string(22) "create_acct_complete_m" ["billing_group"]=> array(1) { ["billing_group_row"]=> array(1) { [0]=> array(7) { ["billing_group_name"]=> string(0) "" ["billing_group_description"]=> string(0) "" ["client_billing_group_id"]=> string(0) "" ["billing_group_idx"]=> string(0) "" ["notify_method"]=> string(0) "" ["notify_template_group"]=> string(0) "" ["statement_template"]=> string(0) "" } } } }