private function array_merge_recursive_keep_keys() {
        $arrays = func_get_args();
        $base = array_shift($arrays);

        foreach ($arrays as $array) {
            reset($base);
            foreach ($array as $key => $value) {
                if (is_array($value) && !empty($base[$key]) && is_array($base[$key])) {
                    $base[$key] = $this->array_merge_recursive_keep_keys($base[$key], $value);
                } else {
                    if (isset($base[$key]) && is_int($key)) {
                        $key++;
                    }
                    $base[$key] = $value;
                }
            }
        }

        return $base;
    }
private function array_merge_recursive_keep_keys() {
        $arrays = func_get_args();
        $base = array_shift($arrays);

        foreach ($arrays as $array) {
            reset($base);
            foreach ($array as $key => $value) {
                if (is_array($value) && !empty($base[$key]) && is_array($base[$key])) {
                    $base[$key] = $this->array_merge_recursive_keep_keys($base[$key], $value);
                } else {
                    if (isset($base[$key]) && is_int($key)) {
                        $key++;
                    }
                    $base[$key] = $value;
                }
            }
        }

        return $base;
    }
private function array_merge_recursive_keep_keys ( ) { $ arrays = func_get_args ( ) ; $ base = array_shift ( $ arrays ) ; foreach ( $ arrays as $ array ) { reset ( $ base ) ; foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) && ! empty ( $ base [ $ key ] ) && is_array ( $ base [ $ key ] ) ) { $ base [ $ key ] = $ this -> array_merge_recursive_keep_keys ( $ base [ $ key ] , $ value ) ; } else { if ( isset ( $ base [ $ key ] ) && is_int ( $ key ) ) { $ key ++ ; } $ base [ $ key ] = $ value ; } } } return $ base ; }
Merges arrays recursively keeping the same keys the original arrays have.

@link http://php.net/manual/es/function.array-merge-recursive.php#114818
@return array
Merges arrays recursively keeping the same keys the original arrays have .