3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $regex = '#(?P<param>[^/]+)#'; var_dump(preg_match($regex, 'moo', $match), $match);
Output for 4.3.3 - 7.2.0
int(1) array(3) { [0]=> string(3) "moo" ["param"]=> string(3) "moo" [1]=> string(3) "moo" }
Output for 4.3.0 - 4.3.2
int(1) array(2) { [0]=> string(3) "moo" [1]=> string(3) "moo" }