3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nb = 100; $data = range(1, 1000); $callback = function ($value, $key) { return [$key => $value]; }; for ($ii = $nb; $ii--; ) { $values = array_map($callback, $data, array_keys($data)); $result = array_replace(...$values); }
based on e5uWE
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.2.6