3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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'); }
based on CcH9F
Output for 5.5.24 - 7.3.1
No
Output for 5.0.0 - 5.4.45
Fatal error: Can't use function return value in write context in /in/t313g on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /in/t313g on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /in/t313g on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/t313g on line 4
Process exited with code 255.