3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'string1+String-2'; $result = preg_match("/([a-zA-Z0-9-_]+[a-zA-Z0-9-_])/", $string, $matches); var_dump($result); var_dump($matches);
Output for 4.3.0 - 7.1.0
int(1) array(2) { [0]=> string(7) "string1" [1]=> string(7) "string1" }