3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match("/(\w+)?/", "",$matches); print_r($matches); echo "\n"; preg_match("/(\w*)/", "",$matches); print_r($matches); $test='test'; $btest= preg_match("/^\w+$/i", $test); print_r($test); print_r($btest . '-');
based on TDdfv
Output for 5.3.18 - 7.2.0
Array ( [0] => ) Array ( [0] => [1] => ) test1-