Recursive version of array_walk and is different from array_walk_recursive, since array_walk_recursive will only visit leaf nodes. \GeekLab\ToolBox\Arrays::explore will hit visit all nodes.
See tests/unit/Arrays_exploreTest.php for using GeekLab\ToolBox\Arrays::renameKey() recursively.
Will return an array with a renamed a key with the order preserved.
$array = [
'xyz' => 1,
'def' => 2
];
\GeekLab\ToolBox\Arrays::renameKey($array, 'def', 'DefLeppard');
Returns the first key of an array.
$array = [
'xyz' => 1,
'def' => 2
];
$fk = \GeekLab\ToolBox\Arrays::firstKey($array);
Returns the last key of an array.
$array = [
'xyz' => 1,
'def' => 2
];
$lk = \GeekLab\ToolBox\Arrays::lastKey($array);
Returns the first value of an array.
$array = [
'xyz' => 1,
'def' => 2
];
$fv = \GeekLab\ToolBox\Arrays::firstValue($array);
$array = [
'xyz' => 1,
'def' => 2
];
$fv = \GeekLab\ToolBox\Arrays::lastValue($array);