3v4l.org

run code in 300+ PHP versions simultaneously
<?php $in = [ [ 'id' => 352, 'name' => 'a' ], [ 'id' => 438, 'name' => 'b' ], [ 'id' => 351, 'name' => 'c' ], ]; $out = array_map(function ($arr) { $arr['selected'] = null; return $arr; }, $in); print_r($out);

preferences:
40.8 ms | 405 KiB | 5 Q