protected function merge(array &$base, array $overwrite) {
		foreach ($overwrite as $key => $value) {
			if (is_int($key)) {
				// add only if it doesn't exist
				if ( ! in_array($overwrite[$key], $base)) {
					$base[] = $overwrite[$key];
				}
			}
			else if (is_array($value)) {
				if (isset($base[$key]) && is_array($base[$key])) {
					$this->merge($base[$key], $value);
				}
				else { # does not exist or it's a non-array
					$base[$key] = $value;
				}
			}
			else { # not an array and not numeric key
				$base[$key] = $value;
			}
		}
	}
protected function merge(array &$base, array $overwrite) {
		foreach ($overwrite as $key => $value) {
			if (is_int($key)) {
				// add only if it doesn't exist
				if ( ! in_array($overwrite[$key], $base)) {
					$base[] = $overwrite[$key];
				}
			}
			else if (is_array($value)) {
				if (isset($base[$key]) && is_array($base[$key])) {
					$this->merge($base[$key], $value);
				}
				else { # does not exist or it's a non-array
					$base[$key] = $value;
				}
			}
			else { # not an array and not numeric key
				$base[$key] = $value;
			}
		}
	}
protected function merge ( array & $ base , array $ overwrite ) { foreach ( $ overwrite as $ key => $ value ) { if ( is_int ( $ key ) ) { // add only if it doesn't exist if ( ! in_array ( $ overwrite [ $ key ] , $ base ) ) { $ base [ ] = $ overwrite [ $ key ] ; } } else if ( is_array ( $ value ) ) { if ( isset ( $ base [ $ key ] ) && is_array ( $ base [ $ key ] ) ) { $ this -> merge ( $ base [ $ key ] , $ value ) ; } else { # does not exist or it's a non-array $ base [ $ key ] = $ value ; } } else { # not an array and not numeric key $ base [ $ key ] = $ value ; } } }
Merge configuration arrays.

This function does not return a new array, the first array is simply
processed directly; for effeciency.

Behaviour: numeric key arrays are appended to one another, any other key
and the values will overwrite.

@param array base
@param array overwrite
Merge configuration arrays .