3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT']) || // This regex fails to detect IE 11 preg_match('/^(?=.*(Trident))(?=.*(rv:11.0)).*$/', $_SERVER['HTTP_USER_AGENT'])) { echo 'true'; } else { echo 'false'; }
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: HTTP_USER_AGENT in /in/lvHQN on line 2 Notice: Undefined index: HTTP_USER_AGENT in /in/lvHQN on line 3 false
Output for 4.3.0 - 5.2.17
Notice: Undefined index: HTTP_USER_AGENT in /in/lvHQN on line 2 Notice: Undefined index: HTTP_USER_AGENT in /in/lvHQN on line 3 false