3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $matches = 'organization/project'; preg_match("/(\w+-)?/", "organization/project",$matches); print_r($matches); echo "\n"; preg_match("/(\w*-)/", "organ-ization/project",$matches); print_r($matches);
based on 6p6Cf
Output for 4.3.0 - 5.6.25, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => ) Array ( [0] => organ- [1] => organ- )