public static function stristr($str, $search)
    {
        if (strlen($search) === 0) {
            return $str;
        }

        $lstr = AnHelperString::strtolower($str);
        $lsearch = AnHelperString::strtolower($search);
        preg_match('|^(.*)'.preg_quote($lsearch).'|Us', $lstr, $matches);

        if (count($matches) === 2) {
            return substr($str, strlen($matches[1]));
        }

        return false;
    }
public static function stristr($str, $search)
    {
        if (strlen($search) === 0) {
            return $str;
        }

        $lstr = AnHelperString::strtolower($str);
        $lsearch = AnHelperString::strtolower($search);
        preg_match('|^(.*)'.preg_quote($lsearch).'|Us', $lstr, $matches);

        if (count($matches) === 2) {
            return substr($str, strlen($matches[1]));
        }

        return false;
    }
public static function stristr ( $ str , $ search ) { if ( strlen ( $ search ) === 0 ) { return $ str ; } $ lstr = AnHelperString :: strtolower ( $ str ) ; $ lsearch = AnHelperString :: strtolower ( $ search ) ; preg_match ( '|^(.*)' . preg_quote ( $ lsearch ) . '|Us' , $ lstr , $ matches ) ; if ( count ( $ matches ) === 2 ) { return substr ( $ str , strlen ( $ matches [ 1 ] ) ) ; } return false ; }
UTF-8 aware alternative to stristr

Returns all of haystack from the first occurrence of needle to the end.
needle and haystack are examined in a case-insensitive manner
Find first occurrence of a string using case insensitive comparison

@param string the haystack
@param string the needle
@return string the sub string
@see http://www.php.net/stristr
UTF - 8 aware alternative to stristr