3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(preg_match('/MSIE (.*?);/', "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)" ) || preg_match('/^(?=.*(Trident))(?=.*(rv:11.0)).*$/', "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)" )) { $url = 'IE detected'; } else { $url = 'not detected'; } echo $url;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
IE detected