3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [1,2,3]; $new_array = array_map(function ($item) {return ['sid' => $item];}, $array); echo print_r($new_array, true);
based on BTmrP
Output for 5.6.0 - 7.2.6
Array ( [0] => Array ( [sid] => 1 ) [1] => Array ( [sid] => 2 ) [2] => Array ( [sid] => 3 ) )