3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $matches = "1111ewrw__"; preg_match("/(\w+)?/", "1ewrw",$matches); print_r($matches); echo "\n"; preg_match("/(\w*)/", "rwerwe",$matches); print_r($matches);
based on 8qsvc
Output for 5.3.19 - 7.2.0
Array ( [0] => 1ewrw [1] => 1ewrw ) Array ( [0] => rwerwe [1] => rwerwe )