private static PhpArray MergeRecursive(PhpArray array, bool deepCopy, params PhpArray[] arrays)
{
if (array == null) return null;
PhpArray result = new PhpArray();
array.AddTo(result, deepCopy);
if (arrays != null)
{
for (int i = 0; i < arrays.Length; i++)
{
if (arrays[i] != null)
{
if (!MergeRecursiveInternal(result, arrays[i], deepCopy))
{
//PhpException.Throw(PhpError.Warning, LibResources.GetString("recursion_detected"));
throw new ArgumentException();
}
}
}
}
return result;
}