3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $old_app_builds = [ '320150624', '320150515', '320150505', '320150408', '320150314', '340', '330', '320' ]; $old_versions = implode("|", $old_app_builds); $user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13B143 Fisheries/320150624 (iOS; 9.1; Release)'; $needs_upgrade = preg_match("/Fisheries\/(" . $old_versions . ")\s+/", $user_agent); echo $needs_upgrade;
based on VELD3
Output for 5.4.10 - 7.3.0beta1
1
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/A3oaS on line 3
Process exited with code 255.