3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern1 = '/^[0-9_\p{L}\p{Cyrillic}]+$/u'; var_dump(preg_match($pattern1, 's')); var_dump(preg_match($pattern1, 'S')); # https://regex101.com/r/F5JvPD/1
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.12 - 7.4.29, 8.0.0 - 8.0.19, 8.1.0 - 8.1.6
int(1) int(1)
Output for 7.4.0 - 7.4.11
int(0) int(1)

preferences:
50.5 ms | 409 KiB | 5 Q