3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function check($value) { return (bool)preg_match('/^([A-ZА-Я]{1}[A-Za-zА-Яа-я]+){1}([\-\s]{1}[A-ZА-Я]{1}[A-Za-zА-Яа-я]+)*$/u', $value); }; $test = 'тест'; var_dump(check($test));
Output for 4.3.0 - 7.2.0
bool(false)