3v4l.org

run code in 300+ PHP versions simultaneously
<?php $e = array('a' => array(1),'b' =>array(1)); foreach($e as $name => $arr) { //echo "here is arr ".$name; if ($name == 'b'){adder($arr);} } // end for loop function adder($carr) { $carr["stuff"] = array("123"); echo var_export($carr); // should show array $e with new array added to 'b' }

preferences:
43.11 ms | 402 KiB | 5 Q