3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Tag {}; $setTags = []; function setTags(array $tags, &$setTags) { array_map( function (Tag $tag) { $setTags[] = $tag; }, $tags ); } var_dump($setTags); setTags( [ new Tag(), new Tag(), new Tag(), new Tag(), ], $setTags ); var_dump($setTags);
based on fJuP5
Output for 5.6.0 - 7.2.8
array(0) { } array(0) { }