3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php parse_str('price-entries[-1][price-entry-meal-id-custom-field]=538&price-entries[-1][price-entry-number-of-adults-custom-field]=1&price-entries[-1][price-entry-number-of-children-custom-field]=1&price-entries[-1][price-entry-child-max-age-custom-field]=&price-entries[-1][price-entry-season-id-custom-field]=534&price-entries[-1][price-entry-price-custom-field]=&price-entries[-1][price-entry-hotel-id-custom-field]=52670&price-entries[-1][price-entry-room-id-custom-field]=52692', $x); parse_str('price-entries[-2][price-entry-meal-id-custom-field]=538&price-entries[-2][price-entry-number-of-adults-custom-field]=2&price-entries[-2][price-entry-number-of-children-custom-field]=&price-entries[-2][price-entry-child-max-age-custom-field]=&price-entries[-2][price-entry-season-id-custom-field]=534&price-entries[-2][price-entry-price-custom-field]=&price-entries[-2][price-entry-hotel-id-custom-field]=52670&price-entries[-2][price-entry-room-id-custom-field]=52692', $y); $z= array_merge($x, $y); var_dump($x, $y);
based on E4DCE
Output for 5.3.22 - 7.3.1
array(1) { ["price-entries"]=> array(1) { [-1]=> array(8) { ["price-entry-meal-id-custom-field"]=> string(3) "538" ["price-entry-number-of-adults-custom-field"]=> string(1) "1" ["price-entry-number-of-children-custom-field"]=> string(1) "1" ["price-entry-child-max-age-custom-field"]=> string(0) "" ["price-entry-season-id-custom-field"]=> string(3) "534" ["price-entry-price-custom-field"]=> string(0) "" ["price-entry-hotel-id-custom-field"]=> string(5) "52670" ["price-entry-room-id-custom-field"]=> string(5) "52692" } } } array(1) { ["price-entries"]=> array(1) { [-2]=> array(8) { ["price-entry-meal-id-custom-field"]=> string(3) "538" ["price-entry-number-of-adults-custom-field"]=> string(1) "2" ["price-entry-number-of-children-custom-field"]=> string(0) "" ["price-entry-child-max-age-custom-field"]=> string(0) "" ["price-entry-season-id-custom-field"]=> string(3) "534" ["price-entry-price-custom-field"]=> string(0) "" ["price-entry-hotel-id-custom-field"]=> string(5) "52670" ["price-entry-room-id-custom-field"]=> string(5) "52692" } } }