3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'foobar: 2008'; preg_match('/(?P<name>\w+): (?P<zahl>\d+)/', $str, $treffer); print_r($treffer); ?>
based on 2ObmH
Output for 5.6.0 - 7.3.0beta1
Array ( [0] => foobar: 2008 [name] => foobar [1] => foobar [zahl] => 2008 [2] => 2008 )