3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array[] = array('first'=>'jake','last'=>'quattrocchi'); $array[] = array('first'=>'david'); foreach($array as $key=>$value){ $value['first'] = 'adfgadgadfg'; } var_dump($array);
based on 1oWPp
Output for 4.3.0 - 7.1.0
array(2) { [0]=> array(2) { ["first"]=> string(4) "jake" ["last"]=> string(11) "quattrocchi" } [1]=> array(1) { ["first"]=> string(5) "david" } }