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

array_key_exists() public static method

Checks if a key exists in the array.
key is converted before the search.
argument is a null reference (Warning). has type which is illegal for array key.
public static array_key_exists ( IntStringKey key, PhpArray array ) : bool
key IntStringKey The key to be searched for.
array Pchp.Core.PhpArray The array where to search for the key.
return bool
        public static bool array_key_exists(IntStringKey key, PhpArray array)
        {
            if (array == null)
            {
                // TODO: PhpException.ArgumentNull("array");
                return false;
            }

            return array.ContainsKey(key);

            //if (Core.Convert.ObjectToArrayKey(key, out array_key))
            //    return array.ContainsKey(array_key);

            //PhpException.Throw(PhpError.Warning, CoreResources.GetString("illegal_offset_type"));
            //return false;
        }