Since you're sniffing browser, perhaps use the get_browser()
function... but you should not rely on user agents!
It's up to the browser to determine what to set as its user agent for HTTP_USER_AGENT.
Lastly, Starting with IE11, the user-agent string no longer includes the version token.