protected function filterBrowserNames(array $userAgent)
    {
        // IE11 hasn't 'MSIE' in its user agent string
        if (empty($userAgent['browser_name']) && $userAgent['browser_engine'] === 'trident' && strpos($userAgent['string'], 'rv:')) {
            $userAgent['browser_name'] = 'msie';
            $userAgent['browser_version'] = preg_replace('|.+rv:([0-9]+(?:\.[0-9]+)+).+|', '$1', $userAgent['string']);

            return $userAgent;
        }

        return $userAgent;
    }
protected function filterBrowserNames(array $userAgent)
    {
        // IE11 hasn't 'MSIE' in its user agent string
        if (empty($userAgent['browser_name']) && $userAgent['browser_engine'] === 'trident' && strpos($userAgent['string'], 'rv:')) {
            $userAgent['browser_name'] = 'msie';
            $userAgent['browser_version'] = preg_replace('|.+rv:([0-9]+(?:\.[0-9]+)+).+|', '$1', $userAgent['string']);

            return $userAgent;
        }

        return $userAgent;
    }
protected function filterBrowserNames ( array $ userAgent ) { // IE11 hasn't 'MSIE' in its user agent string if ( empty ( $ userAgent [ 'browser_name' ] ) && $ userAgent [ 'browser_engine' ] === 'trident' && strpos ( $ userAgent [ 'string' ] , 'rv:' ) ) { $ userAgent [ 'browser_name' ] = 'msie' ; $ userAgent [ 'browser_version' ] = preg_replace ( '|.+rv:([0-9]+(?:\.[0-9]+)+).+|' , '$1' , $ userAgent [ 'string' ] ) ; return $ userAgent ; } return $ userAgent ; }
Filters browser names to increase accuracy.

@param array $userAgent The user agent information

@return array Returns the updated user agent information.
Filters browser names to increase accuracy .