3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Initial, default option set (numerically indexed) $coverage_options = [ 0 => ['State Minimum' => 'State Minimum'], 1 => ['15/30' => '$15,000 / $30,000'], 2 => ['25/25' => '$25,000 / $25,000'], 3 => ['25/50' => '$25,000 / $50,000'], 4 => ['50/50' => '$50,000 / $50,000'], 5 => ['50/100' => '$50,000 / $100,000'], 6 => ['100/100' => '$100,000 / $100,000'], 7 => ['100/300' => '$100,000 / $300,000'], 8 => ['250/500' => '$250,000 / $500,000'], 9 => ['300/300' => '$300,000 / $300,000'], 10 => ['500/500' => '$500,000 / $500,000'], 11 => ['1000/1000' => '$1,000,000 / $1,000,000'], 12 => ['55CSL' => '55 CSL'], 13 => ['100CSL' => '100 CSL'], 14 => ['300CSL' => '300 CSL'], 15 => ['500CSL' => '500 CSL'], ]; unset($coverage_options[1], $coverage_options[2]); // array_splice($coverage_options, 1, 0, [['20/40' => '$20,000 / $40,000']]); //$coverage_options[1] = ['20/40' => '$20,000 / $40,000']; array_splice($coverage_options, 3, 0, [['25/65' => '$25,000 / $65,000']]); var_dump($coverage_options);
based on AoG2Y
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
array(15) { [0]=> array(1) { ["State Minimum"]=> string(13) "State Minimum" } [1]=> array(1) { ["25/50"]=> string(17) "$25,000 / $50,000" } [2]=> array(1) { ["50/50"]=> string(17) "$50,000 / $50,000" } [3]=> array(1) { ["25/65"]=> string(17) "$25,000 / $65,000" } [4]=> array(1) { ["50/100"]=> string(18) "$50,000 / $100,000" } [5]=> array(1) { ["100/100"]=> string(19) "$100,000 / $100,000" } [6]=> array(1) { ["100/300"]=> string(19) "$100,000 / $300,000" } [7]=> array(1) { ["250/500"]=> string(19) "$250,000 / $500,000" } [8]=> array(1) { ["300/300"]=> string(19) "$300,000 / $300,000" } [9]=> array(1) { ["500/500"]=> string(19) "$500,000 / $500,000" } [10]=> array(1) { ["1000/1000"]=> string(23) "$1,000,000 / $1,000,000" } [11]=> array(1) { ["55CSL"]=> string(6) "55 CSL" } [12]=> array(1) { ["100CSL"]=> string(7) "100 CSL" } [13]=> array(1) { ["300CSL"]=> string(7) "300 CSL" } [14]=> array(1) { ["500CSL"]=> string(7) "500 CSL" } }