3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $users = array(35,25,45,34,56,67); $months = array('smelly','stinky','chubby','grubby','nubby','funky'); foreach($users as $user){ $mdata[$user] = array(); foreach($months as $month){ array_push($mdata[$user],$month); } } print_r($mdata); ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [35] => Array ( [0] => smelly [1] => stinky [2] => chubby [3] => grubby [4] => nubby [5] => funky ) [25] => Array ( [0] => smelly [1] => stinky [2] => chubby [3] => grubby [4] => nubby [5] => funky ) [45] => Array ( [0] => smelly [1] => stinky [2] => chubby [3] => grubby [4] => nubby [5] => funky ) [34] => Array ( [0] => smelly [1] => stinky [2] => chubby [3] => grubby [4] => nubby [5] => funky ) [56] => Array ( [0] => smelly [1] => stinky [2] => chubby [3] => grubby [4] => nubby [5] => funky ) [67] => Array ( [0] => smelly [1] => stinky [2] => chubby [3] => grubby [4] => nubby [5] => funky ) )