3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array('Dan', 'Lisa', 'Eric'); function funtimes(&$data) { echo implode(", ", $data); $data[] = 'John'; } funtimes($data); var_dump($data);
based on S7ogJ
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Dan, Lisa, Ericarray(4) { [0]=> string(3) "Dan" [1]=> string(4) "Lisa" [2]=> string(4) "Eric" [3]=> string(4) "John" }