3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $agent = $_SERVER['USER_AGENT']; if ($agent=='' || preg_match('#(MEGAUPLOAD|Feedfetcher|YisouSpider|HTTrack|HTTPClient|SurveyBot|Anonymous|similarpages|webcollage|MJ12bot|WebCopier|Teleport|ISpider|Wget|Offline|WebSnake|Download|Ezooms|Exabot|Gigabot|DotBot|psbot)#',$agent)) echo 1; else echo 0;
based on OqhBT
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Notice: Undefined index: USER_AGENT in /in/dprBm on line 3 1
Output for 4.3.0 - 5.2.17
Notice: Undefined index: USER_AGENT in /in/dprBm on line 3 1