3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
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" } } }

preferences:
169.41 ms | 407 KiB | 329 Q