3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 'Mozilla/5.0 (Linux; Android 4.0; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19'; $pattern = "/Android (\d).(\d)(?:.(\d))?/"; preg_match($pattern, $a, $matches); print_r($matches);
based on K3NJv
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Android 4.0 [1] => 4 [2] => 0 )
Output for hhvm-3.10.0

Process exited with code 153.