protected function matchBrowser(array $regexes, $string)
    {
        // Build regex that matches phrases for known browsers (e.g. "Firefox/2.0" or "MSIE 6.0").
        // This only matches the major and minor version numbers (e.g. "2.0.0.6" is parsed as simply "2.0").
        $pattern = '#('.join('|', $regexes).')[/ ]+([0-9]+(?:\.[0-9]+)?)#i';

        if (preg_match($pattern, $string, $matches)) {
            return $matches;
        }

        return false;
    }
protected function matchBrowser(array $regexes, $string)
    {
        // Build regex that matches phrases for known browsers (e.g. "Firefox/2.0" or "MSIE 6.0").
        // This only matches the major and minor version numbers (e.g. "2.0.0.6" is parsed as simply "2.0").
        $pattern = '#('.join('|', $regexes).')[/ ]+([0-9]+(?:\.[0-9]+)?)#i';

        if (preg_match($pattern, $string, $matches)) {
            return $matches;
        }

        return false;
    }
protected function matchBrowser ( array $ regexes , $ string ) { // Build regex that matches phrases for known browsers (e.g. "Firefox/2.0" or "MSIE 6.0"). // This only matches the major and minor version numbers (e.g. "2.0.0.6" is parsed as simply "2.0"). $ pattern = '#(' . join ( '|' , $ regexes ) . ')[/ ]+([0-9]+(?:\.[0-9]+)?)#i' ; if ( preg_match ( $ pattern , $ string , $ matches ) ) { return $ matches ; } return false ; }
Matches the list of browser regexes against the given User Agent string.

@param array $regexes The list of regexes
@param string $string The User Agent string

@return array|false Returns the parts of the matching regex or FALSE if no regex matched.
Matches the list of browser regexes against the given User Agent string .