public static function merge()
    {
        $array = func_get_arg(0);
        $Arr = array_slice(func_get_args(), 1);

        if (!is_array($array)) {
            throw new \Exception('Arr::merge() - all arguments must be Array.');
        }

        foreach ($Arr as $arr) {
            if (!is_array($arr)) {
                throw new \Exception('Arr::merge() - all arguments must be Array.');
            }

            foreach ($arr as $key => $value) {
                if (is_int($key)) {
                    array_key_exists($key, $array) ? array_push($array, $value) : $array[$key] = $value;
                } elseif (is_array($value) && array_key_exists($key, $array) && is_array($array[$key])) {
                    $array[$key] = self::merge($array[$key], $value);
                } else {
                    $array[$key] = $value;
                }
            }
        }

        return $array;
    }
public static function merge()
    {
        $array = func_get_arg(0);
        $Arr = array_slice(func_get_args(), 1);

        if (!is_array($array)) {
            throw new \Exception('Arr::merge() - all arguments must be Array.');
        }

        foreach ($Arr as $arr) {
            if (!is_array($arr)) {
                throw new \Exception('Arr::merge() - all arguments must be Array.');
            }

            foreach ($arr as $key => $value) {
                if (is_int($key)) {
                    array_key_exists($key, $array) ? array_push($array, $value) : $array[$key] = $value;
                } elseif (is_array($value) && array_key_exists($key, $array) && is_array($array[$key])) {
                    $array[$key] = self::merge($array[$key], $value);
                } else {
                    $array[$key] = $value;
                }
            }
        }

        return $array;
    }
public static function merge ( ) { $ array = func_get_arg ( 0 ) ; $ Arr = array_slice ( func_get_args ( ) , 1 ) ; if ( ! is_array ( $ array ) ) { throw new \ Exception ( 'Arr::merge() - all arguments must be Array.' ) ; } foreach ( $ Arr as $ arr ) { if ( ! is_array ( $ arr ) ) { throw new \ Exception ( 'Arr::merge() - all arguments must be Array.' ) ; } foreach ( $ arr as $ key => $ value ) { if ( is_int ( $ key ) ) { array_key_exists ( $ key , $ array ) ? array_push ( $ array , $ value ) : $ array [ $ key ] = $ value ; } elseif ( is_array ( $ value ) && array_key_exists ( $ key , $ array ) && is_array ( $ array [ $ key ] ) ) { $ array [ $ key ] = self :: merge ( $ array [ $ key ] , $ value ) ; } else { $ array [ $ key ] = $ value ; } } } return $ array ; }
Merge 2 Arr recursively

@throws \Exception
@return array
Merge 2 Arr recursively