3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '# \w*([0-9]{1}) (\w+)#'; $string = "PHP5 released PHP6 not released"; preg_match_all($pattern, $string, $matches); print_r($matches[1]);

preferences:
47.19 ms | 402 KiB | 5 Q