3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $header = "asd.ads./ads.test+dsa"; #$header = ""; #$header = 123; $header = 'application/vnd.ez.api.test+jSon'; #$name = 'hello [*kitty*],how good is today'; preg_match( '/application\/vnd\.ez\.api\.(.*)\+(?:json|xml)/i', $header, $match ); var_dump( $match );
based on h5Nvg
Output for 4.3.0 - 7.1.0
array(2) { [0]=> string(32) "application/vnd.ez.api.test+jSon" [1]=> string(4) "test" }