public static bool in_array(PhpValue needle, PhpArray haystack, bool strict = false) { var b = array_search(needle, haystack, strict); return !b.IsBoolean || b.Boolean; }