3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ie11_ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'; $ie10_ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)'; $chrome_ua = 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'; $pattern = '/MSIE|Trident/'; $matches = preg_match($pattern, $ie11_ua) === 1; var_dump($matches); $matches = preg_match($pattern, $ie10_ua) === 1; var_dump($matches); $matches = preg_match($pattern, $chrome_ua) === 1; var_dump($matches);
based on oiYrZ
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
bool(true) bool(true) bool(false)