src/Panda/Support/Helpers/StringHelper.php
public static function contains($haystack, $needle)
    {
        // Check arguments
        if (empty($haystack) || empty($needle)) {
            return false;
        }

        // Needle is string
        if (!is_array($needle)) {
            return mb_strpos($haystack, $needle) !== false;
        }

        // Needle is array, check if haystack contains all items
        foreach ((array)$needle as $str_needle) {
            if (!empty($str_needle) && mb_strpos($haystack, $str_needle) === false) {
                return false;
            }
        }

        return true;
    }
public static function contains($haystack, $needle)
    {
        // Check arguments
        if (empty($haystack) || empty($needle)) {
            return false;
        }

        // Needle is string
        if (!is_array($needle)) {
            return mb_strpos($haystack, $needle) !== false;
        }

        // Needle is array, check if haystack contains all items
        foreach ((array)$needle as $str_needle) {
            if (!empty($str_needle) && mb_strpos($haystack, $str_needle) === false) {
                return false;
            }
        }

        return true;
    }
public static function contains ( $ haystack , $ needle ) { // Check arguments if ( empty ( $ haystack ) || empty ( $ needle ) ) { return false ; } // Needle is string if ( ! is_array ( $ needle ) ) { return mb_strpos ( $ haystack , $ needle ) !== false ; } // Needle is array, check if haystack contains all items foreach ( ( array ) $ needle as $ str_needle ) { if ( ! empty ( $ str_needle ) && mb_strpos ( $ haystack , $ str_needle ) === false ) { return false ; } } return true ; }
Check if a given string contains a given substring.

@param string       $haystack
@param string|array $needle

@return bool
Check if a given string contains a given substring .