/** * Custom array_replace_recursive to be used if PHP < 5.3 * * @return array */ public static function array_replace_recursive($array1, $array2) { if (function_exists('array_replace_recursive')) { return array_replace_recursive($array1, $array2); } else { foreach ($array2 as $key => $value) { if (is_array($value)) { $array1[$key] = Mysqldump::array_replace_recursive($array1[$key], $value); } else { $array1[$key] = $value; } } return $array1; } }