Invokes the function for each value in the array. Creates a new array containing the values returned by the function.
Example:
$array = array('a' => '1', 'b' => '2', 'c' => '3');
$result = Arrays::mapEntries($array, function ($key, $value) {
return $key . '_' . $value;
});
Result:
Array
(
[a] => a_1
[b] => b_2
[c] => c_3
)