3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'application/vnd.github.full+json'; $pattern = '#([a-z].*)/([a-z0-9.-]*)([+]([a-z]*))?#i'; preg_match($pattern, $string, $matches); var_dump($matches);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(5) { [0]=> string(32) "application/vnd.github.full+json" [1]=> string(11) "application" [2]=> string(15) "vnd.github.full" [3]=> string(5) "+json" [4]=> string(4) "json" }