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

array_push() public static method

Adds multiple items into an array.
public static array_push ( PhpArray array ) : int
array Pchp.Core.PhpArray The array where to add values.
return int
        public static int array_push(PhpArray array, params PhpValue[] vars)
        {
            if (array == null)
            {
                //PhpException.ReferenceNull("array");
                //return 0;
                throw new ArgumentNullException();
            }

            // adds copies variables (if called by PHP):
            for (int i = 0; i < vars.Length; i++)
            {
                array.Add(vars[i]);
            }

            return array.Count;
        }