Is it possible to detect that IE is in compatibility mode from the useragent with PHP?
I use IE10 and have the useragent
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
So it appears as Internet Explorer 7 then.
Sure, It would be a bad idea to rely on only such a detection by PHP, but it is very useful for some ocasions (for example logging with PHP or debugging-hints,...)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…