3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $types = ['auto', 'int', 'float', 'string', 'html', 'list', 'pattern']; // echo '('.implode('|', $types).')'; $str = 'string(1;25)'; preg_match('/('.implode('|', $types).')\((.*?)\)/i', $str, $matches); var_dump($matches);
based on guVGG
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.8
array(3) { [0]=> string(12) "string(1;25)" [1]=> string(6) "string" [2]=> string(4) "1;25" }