Pchp.Library.Arrays.ArrayReplaceImpl C# (CSharp) Method

ArrayReplaceImpl() static private method

Performs deep copy of array, return array with replacements.
static private ArrayReplaceImpl ( PhpArray array, PhpArray arrays, bool recursive ) : PhpArray
array Pchp.Core.PhpArray
arrays Pchp.Core.PhpArray
recursive bool
return Pchp.Core.PhpArray
        internal static PhpArray ArrayReplaceImpl(PhpArray array, PhpArray[] arrays, bool recursive)
        {
            PhpArray result = array.DeepCopy();

            if (arrays != null)
            {
                for (int i = 0; i < arrays.Length; i++)
                {
                    ArrayReplaceImpl(result, arrays[i], recursive);
                }
            }

            //// if called by PHP language then all items in the result should be in place deeply copied:
            //result.InplaceCopyOnReturn = true;
            return result;
        }

Same methods

Arrays::ArrayReplaceImpl ( PhpArray array, PhpArray replaceWith, bool recursive ) : void