3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $option_array[] = array( "name" => "delivery", "options" => array( "sat", "sun") ); $option_array[] = array( "name" => "colour", "options" => array( "red", "blue", "green") ); $option_array[] = array( "name" => "size", "options" => array( "small", "medium", "large") ); var_dump($option_array);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(3) { [0]=> array(2) { ["name"]=> string(8) "delivery" ["options"]=> array(2) { [0]=> string(3) "sat" [1]=> string(3) "sun" } } [1]=> array(2) { ["name"]=> string(6) "colour" ["options"]=> array(3) { [0]=> string(3) "red" [1]=> string(4) "blue" [2]=> string(5) "green" } } [2]=> array(2) { ["name"]=> string(4) "size" ["options"]=> array(3) { [0]=> string(5) "small" [1]=> string(6) "medium" [2]=> string(5) "large" } } }