I'd go with phpbb_compare_ie_version and taking user_agent, compare_version and compare_operator as arguments,
then do `$ie_version = (int) $matches[1]; ` and put that into phpbb_version_compare