3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match("^[A-Za-z0-9\-_]", "dsgfcdfsg\-sf",$matches); print_r($matches); echo "\n"; preg_match("/(\w*\-)/", "dsgfcdfsg-sf",$matches); print_r($matches);

preferences:
43.92 ms | 402 KiB | 5 Q