<?php $foo = array(array(), array(), array()); foreach($foo as &$bar) { array_push($bar, "baz"); } var_dump($foo);?>
Standard input is empty
array(3) { [0]=> array(1) { [0]=> string(3) "baz" } [1]=> array(1) { [0]=> string(3) "baz" } [2]=> &array(1) { [0]=> string(3) "baz" } }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!