Invokes the function for each key in the array. Creates a new array containing the keys returned by the function.
Example:
$array = array(
'k1' => 'v1',
'k2' => 'v2',
'k3' => 'v3'
);
$arrayWithNewKeys = Arrays::mapKeys($array, function ($key) {
return 'new_' . $key;
});
Result:
Array
(
[new_k1] => v1
[new_k2] => v2
[new_k3] => v3
)