3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "(Yandex(?:(?:\\.Gazeta |Accessibility|Com|Mobile|MobileScreenShot|RenderResources|Screenshot|Sprav)?Bot|(?:AdNet|Antivirus|Blogs|Calendar|Catalog|Dialogs|Direct(?:Dyn)?|Favicons|ForDomain|ImageResizer|Images|Market|Media(?:naBot)?|Metrika|News(?:links)?|OntoDB(?:API)?|Pagechecker|Partner|RCA|SearchShop|(?:News|Site)links|Tracker|Turbo|Userproxy|Verticals|Vertis|Video(?:Parser)?|Webmaster))|YaDirectFetcher)"; preg_match_all('/Yandex(?:\\.Gazeta )?(?:[A-Z][a-z]+)*(?:Bot)?|YaDirectFetcher/', $pattern, $m); $bots = array_unique(array_filter($m[0])); sort($bots); print_r($bots); ?>
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Array ( [0] => YaDirectFetcher [1] => Yandex )

preferences:
43.1 ms | 702 KiB | 4 Q