3v4l.org

run code in 300+ PHP versions simultaneously
<?php $clean_user_agent_test = ' Mozilla/5.0 (Linux; U; Android 4.2; xx-xx; v89_gq2008s Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'; if (empty(preg_grep("/(Mac OS)/", explode("\n", $clean_user_agent_test)))){ print('No'); } else{ print('Yes'); }

preferences:
72.39 ms | 405 KiB | 5 Q