3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $isAb = false; $t = array(); if(isset($t['HTTP_USER_AGENT'])){ $sessionLessUseragents = array( 'ApacheBench', 'http://www.majestic12.co.uk/bot.php', 'http://www.google.com/bot.html', 'http://yandex.com/bots', 'http://www.bing.com/bingbot.htm', 'http://search.msn.com/msnbot.htm', 'http://ahrefs.com/robot/', 'http://www.baidu.com/search/spider.html', 'http://www.projectwonderful.com/', 'http://webmeup-crawler.com/', 'http://OpenLinkProfiler.org/bot', 'http://www.pingdom.com', 'http://www.opensiteexplorer.org/dotbot', 'http://www.easou.com/search/spider.html', ); foreach($sessionLessUseragents as $sessionLessUseragent){ if(strrpos($t['HTTP_USER_AGENT'], $sessionLessUseragent) !== false){ $isAb = true; break; } } }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0