/// <summary> /// Internal method common for all functions. /// </summary> private static PhpArray SetOperation(SetOperations op, PhpArray array, PhpArray[] arrays, IComparer<KeyValuePair<IntStringKey, PhpValue>> comparer) { if (array == null) { //PhpException.ArgumentNull("array"); //return null; throw new ArgumentNullException(); } if (arrays == null || arrays.Length == 0) { //PhpException.InvalidArgumentCount(null, null); //return null; throw new ArgumentException(); } Debug.Assert(comparer != null); PhpArray result = new PhpArray(); array.SetOperation(op, arrays, comparer, result); // the result is inplace deeply copied on return to PHP code: //result.InplaceCopyOnReturn = true; return result; }