3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $year = 1987; echo (preg_match('/^[0-9]{4}$/', $year)) ? 'yes' : 'no';
based on j0bSr
Output for 5.6.0 - 7.3.0rc4
yes