3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'username1234_-'; preg_match('/[\w\d_-]{,3}+/', $string, $match); var_dump($match);

preferences:
47.13 ms | 405 KiB | 5 Q