3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v = ""; var_dump(preg_match('/^[a-z]{2}(?:[\-_][A-Z]{2})?$/iu', $v));

preferences:
27.74 ms | 405 KiB | 5 Q