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

in_array() public static method

Checks if a value exists in an array.
is a null reference (Warning).
public static in_array ( PhpValue needle, PhpArray haystack, bool strict = false ) : bool
needle Pchp.Core.PhpValue The value to search for.
haystack Pchp.Core.PhpArray The where to search.
strict bool Whether strict comparison method (operator ===) is used for comparing values.
return bool
        public static bool in_array(PhpValue needle, PhpArray haystack, bool strict = false)
        {
            var b = array_search(needle, haystack, strict);
            return !b.IsBoolean || b.Boolean;
        }