3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $result=FALSE; $date =""; $pattern = '/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/'; preg_match($pattern, $date, $matches); if (is_array($matches) AND count($matches) >=1) { print "Valid Date"; }else{ print "Not Valid Date"; }
Output for 4.3.0 - 7.1.0
Not Valid Date