3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (preg_match( '/\b((IA|IO|A|O|D)[0-9]{6})(-*(R|revised)[\w]*)*\b/i', trim("O529012"), $matches ) ) { var_dump($matches); }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(3) { [0]=> string(7) "O529012" [1]=> string(7) "O529012" [2]=> string(1) "O" }
Output for hhvm-3.10.0

Process exited with code 153.