PHP Array Reorder

In one of my projects I had to re-order an array, placing an existing key-value to someplace else with an user specified integer. The thing about PHP’s many native functions, they all have different consequences and outcomes to each native function; preserve keys, ordering, sort by.. so on. For this task, I had keep the keys and move an value whilst keeping the rest of the array keys & values untouched, pretty much like shifting an array at any point. This StackOverFlow User ‘Dereleased‘ provided just the ticket:

/**
 *  Re-Order it..
 *
 *      Example:
 *
 *      @Use: array_reorder( array, 3, 1 );
 *
 *          array(
 *              1 => a,
 *              2 => b,
 *              3 => c )
 *
 *      Returns:
 *
 *           array(
 *              1 => c,
 *              2 => b,
 *              3 => a )
 *
**/
private function array_reorder($array, $oldIndex, $newIndex) {
    array_splice(
        $array,
        $newIndex,
        count($array),
        array_merge(
            array_splice($array, $oldIndex, 1),
            array_slice($array, $newIndex, count($array))
        )
    );
    return $array;
}