3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $in = [ [ 'id' => 352, 'name' => 'a' ], [ 'id' => 438, 'name' => 'b' ], [ 'id' => 351, 'name' => 'c' ], ]; $out = array_map(function ($arr) { //$arr['selected'] = null; //return $arr; echo $arr["id"]."<br/>"; }, $in); print_r($out);
based on H2rco
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.0beta1
352<br/>438<br/>351<br/>Array ( [0] => [1] => [2] => )