3v4l.org

run code in 200+ 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 - 7.2.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" }