3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function selecFromRecords($array) { $numargs = func_num_args(); $arg_list = func_get_args(); $out = array(); foreach ($array as $key => $row) { for ($i = 1; $i < $numargs; $i++) { $out[$key][$arg_list[$i]] = $row[$arg_list[$i]]; } } return $out; }
Output for 4.3.0 - 7.1.0