3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function sendemail($id_list,$userid){ foreach($id_list as $id) { printf("$id\n"); // Will run twice, once outputting id1, then id2 } } $idl = Array("id1", "id2"); $uid = "userID"; sendemail($idl, $uid);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
id1 id2