src/Kisma/Core/Utility/Scalar.php
public static function contains( $needle, $haystack, $strict = false )
    {
        foreach ( $haystack as $_index => $_value )
        {
            if ( is_string( $_value ) )
            {
                if ( 0 === strcasecmp( $needle, $_value ) )
                {
                    return true;
                }
            }
            else if ( in_array( $needle, $_value, $strict ) )
            {
                return true;
            }
        }

        return false;
    }
public static function contains( $needle, $haystack, $strict = false )
    {
        foreach ( $haystack as $_index => $_value )
        {
            if ( is_string( $_value ) )
            {
                if ( 0 === strcasecmp( $needle, $_value ) )
                {
                    return true;
                }
            }
            else if ( in_array( $needle, $_value, $strict ) )
            {
                return true;
            }
        }

        return false;
    }
public static function contains ( $ needle , $ haystack , $ strict = false ) { foreach ( $ haystack as $ _index => $ _value ) { if ( is_string ( $ _value ) ) { if ( 0 === strcasecmp ( $ needle , $ _value ) ) { return true ; } } else if ( in_array ( $ needle , $ _value , $ strict ) ) { return true ; } } return false ; }
A case-insensitive "in_array" for all intents and purposes. Works with objects too!

@param string       $needle
@param array|object $haystack
@param bool         $strict

@return bool Returns true if found, false otherwise. Just like in_array
A case - insensitive in_array for all intents and purposes . Works with objects too!