3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match("@^(?:(foo|)|(bar))$@", "bar", $r); var_dump($r);
based on Xdg35
Output for 5.3.19 - 7.3.0rc6
array(3) { [0]=> string(3) "bar" [1]=> string(0) "" [2]=> string(3) "bar" }